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

Free bitcoin.in app withdrawal request My satoshi

October 3, 2025

Goose boom bang! Slot -Collision, Cash and Manga Massacre

September 27, 2025

Cardano is 4% away, saying that Hoskinson will break the Internet.

September 21, 2025
Add A Comment

Comments are closed.

Recent Posts

Jiuzi Holdings, Inc. Announces Phased Rollout Of $1 Billion Cryptocurrency Acquisition Plan; First Bitcoin Purchase To Be Completed Within Two Weeks

October 8, 2025

Rome Launches Its Genesis NFT Collection “Imperia” On Magic Eden Launchpad

October 8, 2025

BNB price is less than $1,300 on Meme Season Buzz

October 8, 2025

Cryptocurrency trader, OTC fraud claims $ 1.4 million losses, guessing due to KUCOIN deposits

October 7, 2025

Meanwhile, Bitcoin Life Insurer, Secures $82M To Meet Soaring Demand For Inflation-Proof Savings

October 7, 2025

Pepeto Presale Exceeds $6.93 Million; Staking And Exchange Demo Released

October 7, 2025

Eightco Holdings Inc. ($ORBS) Digital Asset Treasury Launches “Chairman’s Message” Video Series

October 7, 2025

Zeta Network Group Enters Strategic Partnership With SOLV Foundation To Advance Bitcoin-Centric Finance

October 7, 2025

Saylor tells MRBAST to buy Bitcoin even after pause the BTC purchase.

October 7, 2025

Bitcoin Steadies at Rally -Is another powerful brake out just in the future?

October 6, 2025

BitMine Immersion (BMNR) Announces ETH Holdings Exceeding 2.83 Million Tokens And Total Crypto And Cash Holdings Of $13.4 Billion

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

Jiuzi Holdings, Inc. Announces Phased Rollout Of $1 Billion Cryptocurrency Acquisition Plan; First Bitcoin Purchase To Be Completed Within Two Weeks

October 8, 2025

Rome Launches Its Genesis NFT Collection “Imperia” On Magic Eden Launchpad

October 8, 2025

BNB price is less than $1,300 on Meme Season Buzz

October 8, 2025
Most Popular

Donald Trump-Backed DeFi Protocol Is Reportedly Based on Dough Finance Code

September 3, 2024

PRIMEXBT expands its global reach with FSCA regulatory password asset service.

June 2, 2025

Bitcoin ETFs Have 4-8x More BTC Price Influence Than Miners – Study

July 18, 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.