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

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

Bittensor subnet token launches on Kraken

July 6, 2026
Add A Comment

Comments are closed.

Recent Posts

What is a money transmitter? The definition on trial

July 22, 2026

MEXC Appoints Robert MacDonald as Chief Compliance Officer to Lead Global Regulatory Strategy

July 22, 2026

Bybit Presents Exclusive $1M Prize Pool for Stock-Themed Trading As Wall Street Enters Earnings Season

July 22, 2026

TokenInsight Q2 2026 Report: TradFi Momentum Lifts MEXC to No. 2 in Commodity Perpetuals

July 22, 2026

Bybit Reports Lowest BTC Spot Slippage Among Major Crypto Exchanges in Q1 2026, Driven by Rapid Price Improvement Mechanism

July 22, 2026

MEXC Adds Five Ondo Tokenized Stocks Spanning Semiconductors to Power Infrastructure

July 22, 2026

ether.fi Partners with Nexus Mutual to Protect Against ETH Slashing at Institutional Scale

July 22, 2026

Numerai Completes Third Strategic NMR Buyback, Bringing Total Repurchases to $3.2 Million

July 22, 2026

MEXC Launches 0-Fee Stock Futures Campaign With $5,000,000 SNDK Prize Pool

July 22, 2026

Singaporean-Founded Paymonade Clears Europe’s New Crypto Regulations — When Roughly 90% of Europe’s Crypto Firms Fail

July 22, 2026

GLOBAL MEDIA PROCUREMENT: THE 500-YEAR YIXING ZISHA TEAPOTS PARADIGM

July 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

What is a money transmitter? The definition on trial

July 22, 2026

MEXC Appoints Robert MacDonald as Chief Compliance Officer to Lead Global Regulatory Strategy

July 22, 2026

Bybit Presents Exclusive $1M Prize Pool for Stock-Themed Trading As Wall Street Enters Earnings Season

July 22, 2026
Most Popular

Dogecoin has entered mass accumulation territory. Is it time to re-enter?

May 2, 2024

The Sandbox (SAND) joins hands with Food Angel to launch ‘Food Rescue World’

June 2, 2024

Galaxy Digital sees ‘tremendous global demand for Bitcoin’. ‘There is a new army of buyers,’ says the CEO.

March 3, 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.