Crypto Flexs
  • DIRECTORY
  • CRYPTO
    • ETHEREUM
    • BITCOIN
    • ALTCOIN
  • BLOCKCHAIN
  • EXCHANGE
  • TRADING
  • SUBMIT
Crypto Flexs
  • DIRECTORY
  • CRYPTO
    • ETHEREUM
    • BITCOIN
    • ALTCOIN
  • BLOCKCHAIN
  • EXCHANGE
  • TRADING
  • SUBMIT
Crypto Flexs
Home»BITCOIN NEWS»utxo – Chain 2 transactions in the same block with bitcoinlib in Python
BITCOIN NEWS

utxo – Chain 2 transactions in the same block with bitcoinlib in Python

By Crypto FlexsDecember 9, 20231 Min Read
Facebook Twitter Pinterest LinkedIn Tumblr Email
utxo – Chain 2 transactions in the same block with bitcoinlib in Python
Share
Facebook Twitter LinkedIn Pinterest Email

I asked yesterday if it is possible to have a tx from A to B and B to C in the same block. The second tx consumes the first UTXO (B’s initial balance is 0).

Apparently it is: Can two related “spends” be in the same block?

But now I’m trying to test this with bitcoinlib in Python. My code is:

wallet = Wallet.create('MyWallet',
                        keys = seed_phrase,
                        witness_type = "segwit")

address = wallet.get_key(0).address
address2 = wallet.get_key(1).address
address3 = wallet.get_key(2).address

wallet.transactions_update()

fee = 1_000
send_value = wallet.balance() - fee

tx = wallet.send( ((address2, send_value)),
                    fee = fee,
                    offline = True)

wallet.transaction_import(tx)

send_value2 = send_value - fee

tx2 = wallet.send( ((address3, send_value2)), 
                     account_id = 1,
                     fee = fee,
                     offline = True)

The first tx works fine since the first address has a balance, but the second address fails with:

WalletError: Create transaction: No unspent transaction outputs found or no key available for UTXO's

The problem seems to be getting the first tx for the wallet.

Any ideas on how to fix this? thank you

Share. Facebook Twitter Pinterest LinkedIn Tumblr Email

Related Posts

Morgan Stanley’s Bitcoin ETF has been a huge success.

July 24, 2026

FTX plans to pay $900 million to creditors when the fifth distribution begins on July 31.

July 18, 2026

Saylor’s strategic message doesn’t help push the Bitcoin story, says StanChart.

July 12, 2026
Add A Comment

Comments are closed.

Recent Posts

When To Move Stablecoin Yield Position: Migration Calculator

October 29, 2026

Bybit’s WSOT Is Coming Back With a Prize Pool of Up to 10 Million USDT

October 28, 2026

Immersive World Betting is coming for casinos. This game from Joy Studios and Cloudbet proves it.

October 28, 2026

PrimeXBT Brings Tesla, SpaceX, NVIDIA and More to Crypto Futures with New Tokenised Stocks

October 27, 2026

Mirae Asset Securities and Grvt Collaborate on Tokenised Funding Note Issuance

October 27, 2026

BC Game introduces Ali “Ako” Muhanned as CEO

October 27, 2026

SwapToZEC.com Highlights USDT-to-ZEC Swaps and Multi-Cryptocurrency Exchange Services

October 27, 2026

Ritual Launches AI-Native Layer 1 for Autonomous Agents

October 26, 2026

Bitmine Immersion Technologies (BMNR) Announces ETH Holdings Reach 6.05 Million Tokens, and Total Crypto and Total Cash & Marketable Securities Holdings of $15 Billion

October 26, 2026

MEXC’s New-Token Trading Volume Rises 77% in September as Stock-Related Trading Expands Into On-Chain New-Token Markets

October 22, 2026

Bybit KZ and Alatau City Authority sign MoC on tokenization, digital asset payments, cross-border remittances

October 22, 2026

Crypto Flexs is a Professional Cryptocurrency News Platform. Here we will provide you only interesting content, which you will like very much. We’re dedicated to providing you the best of Cryptocurrency. We hope you enjoy our Cryptocurrency News as much as we enjoy offering them to you.

Contact Us : Partner(@)Cryptoflexs.com

Top Insights

When To Move Stablecoin Yield Position: Migration Calculator

October 29, 2026

Bybit’s WSOT Is Coming Back With a Prize Pool of Up to 10 Million USDT

October 28, 2026

Immersive World Betting is coming for casinos. This game from Joy Studios and Cloudbet proves it.

October 28, 2026
Most Popular

AI -centered transaction innovation in deep diving

March 3, 2025

You need to save 70% to conquer the $1 peak again.

April 4, 2024

Majority of Financial Advisor Clients Asked About Cryptocurrencies in 2024 – Bitwise

January 11, 2025
  • Home
  • About Us
  • Contact Us
  • Disclaimer
  • Privacy Policy
  • Terms and Conditions
© 2026 Crypto Flexs

Type above and press Enter to search. Press Esc to cancel.