Todas as lições · CKB node, RPC and indexer · Começa aqui · Glossário
Never pass the terminal "0x" cursor back to indexer get_cellsPráticoDe uma correção
De uma correção · Verificação: certa · Verificada em 2026-11-19
An exhausted indexer get_cells scan returns {objects: [], last_cursor: "0x"} (captured from a real node). The authors report that calling get_cells again with after = "0x" then returns nothing, even once matching cells exist, and a hand-written mock that never returned the real "0x" hid this for days. When paging, stop on an empty page before reading last_cursor, and never send or persist a "0x" cursor. Build paging tests from captured node responses, not hand-written mocks.
Porque importa: A pager that sends or saves the terminal "0x" cursor gets empty pages from then on, even after matching cells appear, so new cells go unseen. In this project inbound messages were lost for days while 360 mock-based tests stayed green.
Padrão
if (objects.length === 0) return; ... if (!next || next === "0x" || next === "0X") return;Tirado do commit, encurtado.
Um teste mudou no mesmo commit
Está ao lado da correcção. Nós não o corremos.
- toastmanAu/daowow:
apps/web/test/rpc.test.js
- Conceitos
- Indexer queries and cell collection, Testing and devnet
- Evidência
- De uma correção: de um projeto, verificada contra o commit
- Vista pela primeira vez
- 2026-09-18
- Última mudança
- 2026-09-18
- Ú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-09-18 · toastmanAu/daowow · mais deste projeto
Mais sobre CKB node, RPC and indexer
- Conflict an orphaned transaction's input on the winning branch when testing a reorg rollback
- Indexer free cell discovery by block scan plus get_live_cell on a local chain
- Indexer RPC module must be listed in ckb.toml rpc modules for get_cells on devnet
Manténs um projeto de onde esta lição veio? Confirma ou corrige
Citar esta lição
LusoCryptoLabs, "Never pass the terminal "0x" cursor back to indexer get_cells", CKB lessons, https://pulse.lusocryptolabs.com/learned/node/never-pass-the-terminal-0x-cursor-back-to-indexer-get-cells, CC BY 4.0, last changed 2026-09-18.