CKB Pulse

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

Preferir
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)

Mais sobre CKB node, RPC and indexer

Ver as 45 deste tema

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.

Tiradas de commits públicos e verificadas contra o commit de onde cada uma veio e o código de hoje do projeto. Lê a fonte antes de confiar numa. Texto sob CC BY 4.0: dá crédito à LusoCryptoLabs, CKB lessons, com uma ligação para a lição. Queres que uma lição seja mudada ou retirada? Abre um issue.