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) returnUm teste mudou no mesmo commit
Está ao lado da correcção. Nós não o corremos.
- RaheemJnr/pocket-node:
android/app/src/test/java/com/rjnr/pocketnode/data/gateway/RegistrationLockTest.kt,android/app/src/test/java/com/rjnr/pocketnode/data/wallet/WalletRepositoryTest.kt,android/app/src/test/java/com/rjnr/pocketnode/ui/components/SyncSheetActionsLayoutTest.kt,android/app/src/test/java/com/rjnr/pocketnode/ui/screens/home/HomeViewModelWalletChangeTest.kt,android/app/src/test/java/com/rjnr/pocketnode/ui/screens/wallet/AddWalletViewModelCancelAddTest.kt
- 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)
- 2026-10-11 · RaheemJnr/pocket-node · mais deste projeto
Mais sobre Light client
- Give light clients the committing block of a cell, not just its outpoint
- Light client set_scripts "all" replaces the whole registered script set
- Light client sync progress poll racing set_scripts
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.