Crypto Flexs
  • DIRECTORY
  • CRYPTO
    • ETHEREUM
    • BITCOIN
    • ALTCOIN
  • BLOCKCHAIN
  • EXCHANGE
  • ADOPTION
  • TRADING
  • HACKING
  • SLOT
  • CASINO
Crypto Flexs
  • DIRECTORY
  • CRYPTO
    • ETHEREUM
    • BITCOIN
    • ALTCOIN
  • BLOCKCHAIN
  • EXCHANGE
  • ADOPTION
  • TRADING
  • HACKING
  • SLOT
  • CASINO
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

Ether ETF is a comeback of $ 280 million, with bitcoin leaked stripes hit on the 5th.

August 22, 2025

Gemini file for Gemi’s NASDAQ list as a loss mount

August 16, 2025

Carv can be used for transactions!

August 10, 2025
Add A Comment

Comments are closed.

Recent Posts

Newcastle United Announce Multi-year Partnership With BYDFi

August 26, 2025

R0AR Chain Launches Public Node Sale Following $1 Million Whitelist Success

August 26, 2025

Easy Cloud Mining, High Daily Returns

August 26, 2025

Crypto liquidation exceeds $ 900m after the Fed Chair ‘s jackson hole speech.

August 26, 2025

What happened in Crypto today

August 26, 2025

BitMine Immersion (BMNR) Reigns as the #1 ETH Treasury in the World, 2nd Largest Crypto Treasury Globally and the 20th Most Liquid US Stock, Trading $2.8 Billion per Day on Average

August 25, 2025

Gamdom Launches Next-Level Sportsbook Experience

August 25, 2025

NE-YO Partners With Neura To Transform Entertainment With Emotional AI

August 25, 2025

Mine BTC Daily With Okalio Mining, Allowing You To Earn Steady Profits Without Investing In Equipment!

August 25, 2025

HKGAI And FLock.io Partner To Advance Decentralised AI For Government Efficiency

August 25, 2025

BNB chain overtakes polygons with NFT sales on the 7th.

August 25, 2025

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

Newcastle United Announce Multi-year Partnership With BYDFi

August 26, 2025

R0AR Chain Launches Public Node Sale Following $1 Million Whitelist Success

August 26, 2025

Easy Cloud Mining, High Daily Returns

August 26, 2025
Most Popular

Lawmakers debate CFPB oversight of payment apps and cryptocurrencies.

March 14, 2024

Chainlink price prediction – Here is the rally on LINK chart:

October 31, 2024

The Dragon’s Fortune – Level up in an epic adventure for prizes!

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

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