lightningd: allow account db version 18.
What changed, and why it matters
This is a tiny one-line fix that stops Core Lightning from crashing on startup for users who already ran a newer development version. It is not a security vulnerability and cannot be exploited by an attacker. The change simply recognizes database version 18 as valid so the normal upgrade process can continue.
No security action required. Treat as a normal bug-fix commit. Users affected by the startup error should upgrade to a build containing this commit.
Security signals we found
No security-relevant code path changed
No input validation, cryptography, or network handling modified
Fix prevents a startup failure, not an attack
No memory safety, authorization, or secrecy concerns in diff
Evidence from the diff
The commit changes a guard in migrate_from_account_db() to accept account database version 18 in addition to version 17. Version 18 corresponds to a harmless migration that moves some ignored anchor chain events from the ‘wallet’ account to the ‘external’ account. If a node had already applied that migration from a recent master build, the old code would call fatal() and refuse to start. The patch allows the already-migrated state and lets the regular migration logic proceed safely.
Changed components
wallet/account_migration.cAccount database migration logicInspect captured patch +1 / −1
diff --git a/wallet/account_migration.c b/wallet/account_migration.c
index 3e4807de..344a3e4e 100644
--- a/wallet/account_migration.c
+++ b/wallet/account_migration.c
@@ -385,7 +385,7 @@ void migrate_from_account_db(struct lightningd *ld, struct db *db)
goto out;
}
/* Last migration was 24.08. Migrate there first if this happens. */
- if (version != 17)
+ if (version != 17 && version != 18)
fatal("Cannot migrate account database version %i", version);
chain_events = list_chain_events(tmpctx, account_db);
channel_events = list_channel_events(tmpctx, account_db);
Why this scored 19/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.