Todas as lições · Wallets and signing · Começa aqui · Glossário
Release a stuck signed transaction's inputs only after one input is spent elsewherePráticoDe uma correção
De uma correção · Verificação: em parte certa · Verificada em 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.
Porque importa: 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.
Padrão
requireRecovery(spent>0,'all inputs are live; the signed transaction can still commit');Tirado do commit, encurtado.
Um teste mudou no mesmo commit
Está ao lado da correcção. Nós não o corremos.
- 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
- Conceitos
- Transaction building and fees, Indexer queries and cell collection, Network and RPC reliability
- Evidência
- De uma correção: de um projeto, verificada contra o commit
- Vista pela primeira vez
- 2026-10-22
- Última mudança
- 2026-10-22
- Última verificação
- 2026-11-19
- Verificação contra o commit
- em parte certa: um núcleo verdadeiro, com uma parte solta ou demasiado larga
Fontes (2)
- 2026-10-22 · toastmanAu/openswap · mais deste projeto
- 2026-10-22 · toastmanAu/openswap · mais deste projeto
Mais sobre 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
Manténs um projeto de onde esta lição veio? Confirma ou corrige
Citar esta lição
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.