CKB Pulse

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

Evitar
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.

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)

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 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.

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.