mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-19 09:54:16 +01:00
wallet: resolve crash when blockheight is null
We weren't ignoring the 'txindex' field
This commit is contained in:
parent
4326c08927
commit
aa7ffb78bd
@ -4197,9 +4197,10 @@ struct txlocator *wallet_transaction_locate(const tal_t *ctx, struct wallet *w,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (db_col_is_null(stmt, "blockheight"))
|
||||
if (db_col_is_null(stmt, "blockheight")) {
|
||||
db_col_ignore(stmt, "txindex");
|
||||
loc = NULL;
|
||||
else {
|
||||
} else {
|
||||
loc = tal(ctx, struct txlocator);
|
||||
loc->blkheight = db_col_int(stmt, "blockheight");
|
||||
loc->index = db_col_int(stmt, "txindex");
|
||||
|
Loading…
Reference in New Issue
Block a user