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

Try to win on Great Game Rockies slots

June 18, 2026

The Federal Reserve paused interest rate cuts after Bitcoin fell below $88,000.

June 12, 2026

What are the next steps for HYPE June token unlock?

June 6, 2026
Add A Comment

Comments are closed.

Recent Posts

World extends AgentKit to connect human-verified AI agents to World ID

June 24, 2026

Dogecoin (DOGE) recovery gains traction. Can you get bigger profits?

June 24, 2026

Bitcoin Confirms Bearish Pattern: Is the Next Step Coming Soon?

June 24, 2026

Pi Network falls below $0.1300 as sellers tighten control.

June 23, 2026

Cumberland, Fluid, And SwissBorg Join Institutional Coalition On Hashi Ahead Of July Global Testnet

June 23, 2026

Bitcoin Suisse Receives MiCAR License And Launches European Expansion

June 23, 2026

MyTonWallet Rebrands To My Wallet After Expanding To 11 Blockchains

June 23, 2026

There were flashes of signs of ‘altcoin season’, but it was triggered by Bitcoin’s decline.

June 23, 2026

MoneyGram became a Solana validator and staked SOL to strengthen its blockchain role.

June 23, 2026

Ethlabs, Founded by Former Ethereum Foundation Contributors and Funded by Bitmine, Sharplink and Joe Lubin, Launches to Accelerate Ethereum’s Institutional Supercycle

June 22, 2026

Bitmine Reports 5.67M ETH Holdings, Total Assets Reach $10.7B

June 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

World extends AgentKit to connect human-verified AI agents to World ID

June 24, 2026

Dogecoin (DOGE) recovery gains traction. Can you get bigger profits?

June 24, 2026

Bitcoin Confirms Bearish Pattern: Is the Next Step Coming Soon?

June 24, 2026
Most Popular

Yuga Labs restructures the company to build a smaller cryptocurrency-based team.

April 27, 2024

With $9.3 billion worth of stablecoins flowing into exchanges, traders are bracing for a rise in Bitcoin prices.

November 8, 2024

Bitcoin exchange inflows fall to a 10-year low after hitting an all-time high of $74,000

May 7, 2024
  • 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.