Todas as lições · Light client · Começa aqui · Glossário
Light client set_scripts "all" replaces the whole registered script setPráticoDe uma correção
De uma correção · Verificação: certa · Verificada em 2026-11-19
The CKB light client's set_scripts with the all command replaces every registered script, so a call carrying only one wallet's lock script unregisters all other wallets. When several scripts must stay tracked, either pass the full set with each script's own start block, or use the partial command to update only the changed script. If registrations can race, serialise them so a stale full set cannot overwrite a newer one.
Porque importa: Re-registering one wallet with the all command after a sync mode change silently stopped syncing every other wallet in the app.
Padrão
setScriptsAndRecord(scriptStatuses + ..., listOf(activeWalletId) + ..., LightClientNative.CMD_SET_SCRIPTS_ALL)Tirado do commit, encurtado.
Um 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/GatewayRepositoryResyncStrategyTest.kt,android/app/src/test/java/com/rjnr/pocketnode/data/gateway/TestGatewayRepository.kt,android/app/src/test/java/com/rjnr/pocketnode/data/wallet/WalletRepositoryTest.kt,android/app/src/test/java/com/rjnr/pocketnode/ui/screens/onboarding/MnemonicImportViewModelSyncTest.kt,android/app/src/test/java/com/rjnr/pocketnode/ui/screens/wallet/AddWalletViewModelImportSyncTest.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-09-30
- Última mudança
- 2026-09-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-09-30 · 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 still reports a removed script until the new script set lands
- 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 set_scripts "all" replaces the whole registered script set", CKB lessons, https://pulse.lusocryptolabs.com/learned/light-client/light-client-set-scripts-all-replaces-the-whole-registered-s, CC BY 4.0, last changed 2026-09-30.