All lessons · Wallets and signing · Start here · Glossary
Release a stuck signed transaction's inputs only after one input is spent elsewhereWorkingFrom one fix
From one fix · Check: partly right · Checked 2026-11-19
A signed CKB transaction that is not committed (not pending, proposed or sent) is still valid and can be broadcast by anyone while all its inputs are live, so do not release its input reservations yet. Release them only after a committed-state live-cell check shows at least one input spent (a spend still in the tx pool does not count), and a second status check confirms the transaction still has not committed. A conflicting spend can still be reorganized away, so require the operator to acknowledge that risk.
Why it matters: If reservations are freed while the old signed transaction can still be broadcast, its inputs get reused for new transactions while the stale transaction may still land on chain.
Pattern
requireRecovery(spent>0,'all inputs are live; the signed transaction can still commit');Taken from the commit, shortened.
A test changed in the same commit
It sits next to the fix. We did not run it.
- toastmanAu/openswap:
pool-sdk/test/funding-fixture.ts,pool-sdk/test/funding.test.ts,pool-sdk/test/recovery.test.ts - toastmanAu/openswap:
solver/test/resolution.test.ts
- Concepts
- Transaction building and fees, Indexer queries and cell collection, Network and RPC reliability
- Evidence
- From one fix: from one project, checked against its commit
- First seen
- 2026-10-22
- Last changed
- 2026-10-22
- Last checked
- 2026-11-19
- Check against the commit
- partly right: a true core, with a part that is loose or too wide
Sources (2)
- 2026-10-22 · toastmanAu/openswap · more from this project
- 2026-10-22 · toastmanAu/openswap · more from this project
More about Wallets and signing
- Address balance via get_cells_capacity with snake_case lock script
- Count only empty, typeless lock cells as spendable balance
- JoyID lock witness outputType may carry a subkey proof, so type script data must move elsewhere
Do you maintain a project this lesson came from? Confirm or correct it
Cite this lesson
LusoCryptoLabs, "Release a stuck signed transaction's inputs only after one input is spent elsewhere", CKB lessons, https://pulse.lusocryptolabs.com/learned/wallets/release-a-stuck-signed-transaction-s-inputs-only-after-one-i, CC BY 4.0, last changed 2026-10-22.