CKB Pulse

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

Preferir
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.

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)

Mais sobre Wallets and signing

Ver as 23 deste tema

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.

Tiradas de commits públicos e verificadas contra o commit de onde cada uma veio e o código de hoje do projeto. Lê a fonte antes de confiar numa. Texto sob CC BY 4.0: dá crédito à LusoCryptoLabs, CKB lessons, com uma ligação para a lição. Queres que uma lição seja mudada ou retirada? Abre um issue.