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

Best altcoins to buy as Bitcoin struggles below $85,000 after massive liquidations

April 7, 2026

Stablecoin expansion for DeFi users

April 1, 2026

Bitmine Crypto Strategy Tracking: How much Bitcoin and Ethereum does the company hold?

March 26, 2026
Add A Comment

Comments are closed.

Recent Posts

MostLogin launches anti-detection security framework to protect Web3 assets

April 8, 2026

Best altcoins to buy as Bitcoin struggles below $85,000 after massive liquidations

April 7, 2026

MetaWin Gives Back Over $13 Million To Players Through Ongoing Loyalty Rewards Program

April 7, 2026

Whale.io Launches The First AI Agent MCP For Crypto Casino

April 7, 2026

How To Legally Launch A Crypto Exchange Or Wallet Service In Europe

April 7, 2026

Why Bitcoin Forecasting Platforms Deserve A Spot

April 7, 2026

Crypto ETF outflows surge to nearly $1 billion as volatility surges

April 7, 2026

CoinRabbit Reduces Crypto Lending Rates For XRP Loans And 300+ Assets

April 6, 2026

Bitmine Immersion Technologies (BMNR) Announces ETH Holdings Reach 4.803 Million Tokens, And Total Crypto And Total Cash Holdings Of $11.4 Billion

April 6, 2026

Can LINK break out to $27?

April 6, 2026

Berachain BERA Price Prediction 2026 -Growth, Potential, And Risks

April 6, 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

MostLogin launches anti-detection security framework to protect Web3 assets

April 8, 2026

Best altcoins to buy as Bitcoin struggles below $85,000 after massive liquidations

April 7, 2026

MetaWin Gives Back Over $13 Million To Players Through Ongoing Loyalty Rewards Program

April 7, 2026
Most Popular

Despite Polygon’s efforts, MATIC plummeted 5% in 24 hours.

January 24, 2024

Genesis to settle lawsuit filed by New York

February 9, 2024

Scoop: Cryptocurrency Credit Turns Conservative

August 24, 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.