Todas as lições · Developer tooling · Começa aqui · Glossário
Wait for the indexer to reach the block before truncating the devnet chain in reorg testsPráticoDe uma correção
De uma correção · Verificação: certa · Verificada em 2026-11-19
In a devnet reorg test, the inclusion status a client reads from the node does not mean your own indexing service has processed that block. Before truncating the chain below block n, poll that service's indexed block number until it reaches n. Otherwise it never sees the block, never records a rollback, and the test times out on slow CI runners.
Porque importa: If the devnet chain is truncated before the off-chain indexer has processed the inclusion block, the indexer never observes the rollback, so a reorg test waiting for one hangs until it times out on slow runners.
Padrão
d.server_caught_up(n).await?;Tirado do commit, encurtado.
- Conceitos
- Testing and devnet, Indexer queries and cell collection
- 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 · poshboytl/omavote · mais deste projeto
Mais sobre Developer tooling
- ckb-vm-js 0.2.0 (npm) checks header hash instead of rejecting the field
- Derive devnet Spore and system script cell deps from a fresh OffCKB export
- Pass wasm bytes to ckb-vm-js createVerifier in Node
Manténs um projeto de onde esta lição veio? Confirma ou corrige
Citar esta lição
LusoCryptoLabs, "Wait for the indexer to reach the block before truncating the devnet chain in reorg tests", CKB lessons, https://pulse.lusocryptolabs.com/learned/tooling/wait-for-the-indexer-to-reach-the-block-before-truncating-th, CC BY 4.0, last changed 2026-10-08.