CKB Pulse

All lessons · CKB node, RPC and indexer · Start here · Glossary

Wait for tx_pool_info tip to match chain tip before submitting on devnetWorkingFrom one fix

From one fix · Check: right · Checked 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.

Why it matters: 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.

Pattern

Prefer
if actual_hash == expected_hash && actual_number == expected_number { return Ok(()); }

Taken from the commit, shortened.

Concepts
Testing and devnet, Network and RPC reliability
Evidence
From one fix: from one project, checked against its commit
First seen
2026-10-08
Last changed
2026-10-08
Last checked
2026-11-19
Check against the commit
right: the lesson follows from its commit and still holds in the code today

Sources (1)

More about CKB node, RPC and indexer

All 45 in this topic

Do you maintain a project this lesson came from? Confirm or correct it

Cite this lesson
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.

Drawn from public commits and checked against the commit each one came from and the project's code today. Read the source before you rely on one. Text under CC BY 4.0: credit LusoCryptoLabs, CKB lessons, with a link to the lesson. Want a lesson changed or removed? Open an issue.