Todas as lições · CKB node, RPC and indexer · Começa aqui · Glossário
Paging indexer get_cells and get_transactions with last_cursorPráticoDe uma correção
De uma correção · Verificação: certa · Verificada em 2026-11-19
The built-in indexer RPCs get_cells and get_transactions return at most the requested limit (here 0x3e8) plus a last_cursor. To read all results for a search key, pass last_cursor as the fourth param on the next call and stop once a page returns fewer objects than the limit; a single call with a small limit (the old 0xc8 or 0x19) undercounts cells and transactions.
Porque importa: With one call, the address page saw only the first 200 cells and 25 transactions. Live cell counts, occupied capacity, token balances and transaction totals were therefore wrong for any lock with more results than that.
Padrão
const params: unknown[] = [key, "desc", "0x3e8"]; if (cursor) params.push(cursor);Tirado do commit, encurtado.
- Conceitos
- Indexer queries and cell collection, Network and RPC reliability
- Evidência
- De uma correção: de um projeto, verificada contra o commit
- Vista pela primeira vez
- 2026-10-30
- Última mudança
- 2026-10-30
- Ú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-30 · wildanrhmn/ckb-devnet-explorer · mais deste projeto
Mais sobre CKB node, RPC and indexer
- get_live_cell may return "unknown" rather than "dead" for a spent output
- Wait for get_indexer_tip to reach the commit block before re-reading cells
- Check indexer lag with get_indexer_tip before signing
Manténs um projeto de onde esta lição veio? Confirma ou corrige
Citar esta lição
LusoCryptoLabs, "Paging indexer get_cells and get_transactions with last_cursor", CKB lessons, https://pulse.lusocryptolabs.com/learned/node/paging-indexer-get-cells-and-get-transactions-with-last-curs, CC BY 4.0, last changed 2026-10-30.