Skip to content

Commit 52c6ee2

Browse files
committed
wallet: we can assume local_alias field is non-null.
We have a migration which ensures this. Signed-off-by: Rusty Russell <[email protected]>
1 parent 51e52fa commit 52c6ee2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

wallet/wallet.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1814,7 +1814,8 @@ static struct channel *wallet_stmt2channel(struct wallet *w, struct db_stmt *stm
18141814

18151815
scid = db_col_optional_scid(tmpctx, stmt, "scid");
18161816
old_scids = db_col_short_channel_id_arr(tmpctx, stmt, "old_scids");
1817-
alias[LOCAL] = db_col_optional_scid(tmpctx, stmt, "alias_local");
1817+
alias[LOCAL] = tal(tmpctx, struct short_channel_id);
1818+
*alias[LOCAL] = db_col_short_channel_id(stmt, "alias_local");
18181819
alias[REMOTE] = db_col_optional_scid(tmpctx, stmt, "alias_remote");
18191820

18201821
ok &= wallet_shachain_load(w, db_col_u64(stmt, "shachain_remote_id"),

0 commit comments

Comments
 (0)