Skip to content

wallet: spend an unconfirmed output - #154

Open
octobocto wants to merge 1 commit into
LayerTwo-Labs:masterfrom
octobocto:2026-09-08-spend-unconfirmed
Open

octobocto wants to merge 1 commit into
LayerTwo-Labs:masterfrom
octobocto:2026-09-08-spend-unconfirmed

Conversation

@octobocto

@octobocto octobocto commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor

Wallet::select_coins reads the confirmed utxos table only, so a second create_transfer fails with NotEnoughFunds, or it takes the coin the first one spends and fails with UtxoDoubleSpent. The wallet now keeps the unconfirmed outputs it may spend, the mempool holds a chain of at most 25, and a block may spend an output that an earlier transaction of the same body made. This is a hard fork: an old node rejects such a block. --spend-zero-conf-change takes the wallet's own change only, the way Bitcoin Core's -spendzeroconfchange does.

@octobocto
octobocto force-pushed the 2026-09-08-spend-unconfirmed branch 2 times, most recently from 1c8d967 to 837b07e Compare September 8, 2026 06:53
@octobocto octobocto changed the title wallet: spend an unconfirmed output DONOTMERGE: spend an unconfirmed output Sep 8, 2026
@octobocto
octobocto force-pushed the 2026-09-08-spend-unconfirmed branch 6 times, most recently from 4672e34 to fcd38e3 Compare September 8, 2026 10:04
@octobocto octobocto changed the title DONOTMERGE: spend an unconfirmed output spend an unconfirmed output Sep 27, 2026
@octobocto
octobocto force-pushed the 2026-09-08-spend-unconfirmed branch from fcd38e3 to ac69a50 Compare September 27, 2026 15:06
@octobocto octobocto changed the title spend an unconfirmed output wallet: spend an unconfirmed output Sep 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant