全部经验 · Developer tooling · 从这里开始 · 术语表
Wait for the indexer to reach the block before truncating the devnet chain in reorg tests实践来自一次修复
来自一次修复 · 核对结果:正确 · 核对于 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.
为什么重要: 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.
代码模式
d.server_caught_up(n).await?;摘自提交,已缩短。
- 概念
- Testing and devnet, Indexer queries and cell collection
- 证据
- 来自一次修复: 来自一个项目,已对照其提交核对
- 首次出现
- 2026-10-08
- 最近改动
- 2026-10-08
- 最近核对
- 2026-11-19
- 对照提交的核对结果
- 正确:这条经验出自该提交,并且在今天的代码中仍然成立
来源(1)
- 2026-10-08 · poshboytl/omavote · 这个项目的更多经验
更多关于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
引用这条经验
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.