CKB Pulse

Todas as lições · Light client · Começa aqui · Glossário

Light client still reports a removed script until the new script set landsPráticoDe uma correção

De uma correção · Verificação: certa · Verificada em 2026-11-19

The CKB light client keeps reporting a script, with its block number, from get_scripts until you register a new script set that leaves it out. A sync poll that runs between your local delete and that set_scripts call will still see the removed script. Do not let that poll recreate local per script progress for an owner that no longer exists, and clear that progress again once the new set is registered while polling is excluded.

Porque importa: Without the guard, a poll tick in that window writes back the deleted wallet's sync progress row that the delete had just removed, leaving an orphaned row.

Padrão

if (onlyIfWalletExists && walletDao.getById(walletId) == null) return

Um teste mudou no mesmo commit

Está ao lado da correcção. Nós não o corremos.

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-11
Última mudança
2026-10-11
Ú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 Light client

Ver as 5 deste tema

Manténs um projeto de onde esta lição veio? Confirma ou corrige

Citar esta lição
LusoCryptoLabs, "Light client still reports a removed script until the new script set lands", CKB lessons, https://pulse.lusocryptolabs.com/learned/light-client/light-client-still-reports-a-removed-script-until-the-new-sc, CC BY 4.0, last changed 2026-10-11.

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.