CKB Pulse

All lessons · Light client · Start here · Glossary

Light client still reports a removed script until the new script set landsWorkingFrom one fix

From one fix · Check: right · Checked 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.

Why it matters: 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.

Pattern

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

A test changed in the same commit

It sits next to the fix. We did not run it.

Concepts
Indexer queries and cell collection, Network and RPC reliability
Evidence
From one fix: from one project, checked against its commit
First seen
2026-10-11
Last changed
2026-10-11
Last checked
2026-11-19
Check against the commit
right: the lesson follows from its commit and still holds in the code today

Sources (1)

More about Light client

All 5 in this topic

Do you maintain a project this lesson came from? Confirm or correct it

Cite this lesson
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.

Drawn from public commits and checked against the commit each one came from and the project's code today. Read the source before you rely on one. Text under CC BY 4.0: credit LusoCryptoLabs, CKB lessons, with a link to the lesson. Want a lesson changed or removed? Open an issue.