Todas as lições · CKB node, RPC and indexer · Começa aqui · Glossário
Wait for tx_pool_info tip to match chain tip before submitting on devnetPráticoDe uma correção
De uma correção · Verificação: certa · Verificada em 2026-11-19
After generate_block, CKB's tx pool updates its snapshot asynchronously, so a transaction spending just-committed outputs can be rejected (e.g. "Resolve failed Unknown") even though get_live_cell sees them. Before send_transaction or send_test_transaction, poll tx_pool_info until its tip_hash and tip_number equal get_tip_header's hash and number.
Porque importa: Without the wait, a transaction that spends outputs from a block just mined can be rejected by the pool because the pool still resolves inputs against the older snapshot, and a rejected tx should not simply be resubmitted.
Padrão
if actual_hash == expected_hash && actual_number == expected_number { return Ok(()); }Tirado do commit, encurtado.
- Conceitos
- Testing and devnet, Network and RPC reliability
- Evidência
- De uma correção: de um projeto, verificada contra o commit
- Vista pela primeira vez
- 2026-10-08
- Última mudança
- 2026-10-08
- Última verificação
- 2026-11-19
- Verificação contra o commit
- certa: a lição sai do commit e continua a valer no código de hoje
Fontes (1)
- 2026-10-08 · CellScript-Labs/CellScript · mais deste projeto
Mais sobre CKB node, RPC and indexer
- get_transaction returns an object with a null transaction for rejected and unknown txs
- CKB log subscription notifications may carry params.result as a JSON string
- Simulating a real CKB reorg with two devnet nodes over P2P
Manténs um projeto de onde esta lição veio? Confirma ou corrige
Citar esta lição
LusoCryptoLabs, "Wait for tx_pool_info tip to match chain tip before submitting on devnet", CKB lessons, https://pulse.lusocryptolabs.com/learned/node/wait-for-tx-pool-info-tip-to-match-chain-tip-before-submitti, CC BY 4.0, last changed 2026-10-08.