Skip to content

Commit 6ef668e

Browse files
committed
wallet: don't warn if ignored is unset in accounts.db.
Note that this can only happen if you ran a master commit before rc1: ``` 2025-08-21T10:03:03.255Z **BROKEN** lightningd: bookkeper migration: Accessing a null column e.ignored/15 in query SELECT e.id, e.account_id, a.name, e.origin, e.tag, e.credit, e.debit, e.output_value, e.currency, e.timestamp, e.blockheight, e.utxo_txid, e.outnum, e.spending_txid, e.payment_id, e.ignored, e.stealable, e.ev_desc, e.spliced, a.closed_count, a.peer_id, a.we_opened FROM chain_events e LEFT OUTER JOIN accounts a ON e.account_id = a.id ORDER BY e.timestamp, e.id; ``` Signed-off-by: Rusty Russell <[email protected]>
1 parent 22a5e9e commit 6ef668e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

wallet/account_migration.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,11 @@ static struct chain_event *stmt2chain_event(const tal_t *ctx, struct db_stmt *st
124124
} else
125125
e->spending_txid = NULL;
126126

127-
e->ignored = db_col_int(stmt, "e.ignored") == 1;
127+
/* If they ran master before this, ignored might be null! */
128+
if (db_col_is_null(stmt, "e.ignored"))
129+
e->ignored = false;
130+
else
131+
e->ignored = db_col_int(stmt, "e.ignored") == 1;
128132
e->stealable = db_col_int(stmt, "e.stealable") == 1;
129133

130134
if (!db_col_is_null(stmt, "e.ev_desc"))

0 commit comments

Comments
 (0)