mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 07:04:22 +01:00
wallet: resolve crash when blockheight is null
We weren't ignoring the 'txindex' field
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user