mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-18 21:35:11 +01:00
wallet: get first blocknum from any channels.
The previous tests didn't make sense anyway, but I think they were trying to exclude onchain channels. We delete completely forgotten channels anyway now, so we don't need such testing. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
661950e402
commit
bab3b1a16b
@ -628,8 +628,7 @@ u32 wallet_channels_first_blocknum(struct wallet *w)
|
||||
u32 first_blocknum;
|
||||
sqlite3_stmt *stmt =
|
||||
db_query(__func__, w->db,
|
||||
"SELECT MIN(first_blocknum) FROM channels WHERE state >= %d AND state != %d;",
|
||||
OPENINGD, CLOSINGD_COMPLETE);
|
||||
"SELECT MIN(first_blocknum) FROM channels;");
|
||||
|
||||
err = sqlite3_step(stmt);
|
||||
if (err == SQLITE_ROW && sqlite3_column_type(stmt, 0) != SQLITE_NULL)
|
||||
|
Loading…
Reference in New Issue
Block a user