Todas as lições · CCC (TypeScript SDK) · Começa aqui · Glossário
Classifying sendTransaction failures before dropping a pending CKB transactionPráticoDe uma correção
De uma correção · Verificação: em parte certa · Verificada em 2026-11-19
A failed or timed out ccc client.sendTransaction, or a getTransaction status of "rejected" or "unknown", does not prove the transaction can never commit: a node may have taken it, and "rejected" also covers pool removals such as expiry or a full pool. Store the signed bytes before sending. Drop the pending state only on final refusals (ErrorClientVerification, ErrorClientMaxFeeRateExceeded, TransactionFailedToVerify, PoolRejectedMalformedTransaction), or when an input is not live, the transaction that created that input is committed, and the node no longer holds your transaction as pending, proposed or committed. A not-live input alone is not proof, because CCC's getCellLive also returns not live for a cell the node has not seen. Otherwise resend the stored bytes, treating ErrorClientDuplicatedTransaction and PoolRejectedDuplicatedTransaction as success.
Porque importa: Clearing the pending change on a timeout or a non-final rejection loses track of a transaction that a node may still commit, so the account's settings and address diverge from the chain.
Padrão
if (error instanceof ccc.ErrorClientVerification || error instanceof ccc.ErrorClientMaxFeeRateExceeded) return true;Tirado do commit, encurtado.
Um teste mudou no mesmo commit
Está ao lado da correcção. Nós não o corremos.
- officialcmg/ckb-keyway:
tests/recovery-postgres.test.ts,tests/user-wallet.test.ts
- Conceitos
- Network and RPC reliability, Transaction building and fees
- Evidência
- De uma correção: de um projeto, verificada contra o commit
- Vista pela primeira vez
- 2026-11-08
- Última mudança
- 2026-11-08
- Ú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 (1)
- 2026-11-08 · officialcmg/ckb-keyway · mais deste projeto
Mais sobre CCC (TypeScript SDK)
- CCC client cache can keep dropped transactions; check status without cache
- Clamp the node's get_fee_rate_statistics median before using it as a fee rate
- Persist the transaction hash before broadcasting it
Manténs um projeto de onde esta lição veio? Confirma ou corrige
Citar esta lição
LusoCryptoLabs, "Classifying sendTransaction failures before dropping a pending CKB transaction", CKB lessons, https://pulse.lusocryptolabs.com/learned/ccc/classifying-sendtransaction-failures-before-dropping-a-pendi, CC BY 4.0, last changed 2026-11-08.