Todas as lições · CKB node, RPC and indexer · Começa aqui · Glossário
Indexer get_cells order is by script args, not by cell agePráticoDe uma correção
De uma correção · Verificação: certa · Verificada em 2026-11-19
Cells returned by a prefix search on type script args (as findRounds does here) come back in indexer key order, sorted by type args, not by creation time, so taking the first result does not give the newest cell. To get the latest, sort by a field stored in the cell (here the round config's entryStart).
Porque importa: Taking the first cell of a prefix search picks whichever cell has the smallest script args, not the newest one. Here that was a dead round, so the entry and refund pages could not reach the live round or the round with pending refunds.
Padrão
const round = rounds[0];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/discovery.test.js
- Conceitos
- Indexer queries and cell collection
- Evidência
- De uma correção: de um projeto, verificada contra o commit
- Vista pela primeira vez
- 2026-11-09
- Última mudança
- 2026-11-09
- Ú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-11-09 · toastmanAu/daowow · mais deste projeto
Mais sobre CKB node, RPC and indexer
- Check chain-wide script users before consuming a deployed code cell
- Filtering get_cells for plain, typeless, empty funding cells
- get_live_cell may return "unknown" rather than "dead" for a spent output
Manténs um projeto de onde esta lição veio? Confirma ou corrige
Citar esta lição
LusoCryptoLabs, "Indexer get_cells order is by script args, not by cell age", CKB lessons, https://pulse.lusocryptolabs.com/learned/node/indexer-get-cells-order-is-by-script-args-not-by-cell-age, CC BY 4.0, last changed 2026-11-09.