mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-23 00:54:20 +01:00
wallet: fix logic for finding first block.
Over 20 years a professional C programmer, still can't count from zero! Fixes: #709 Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
Christian Decker
parent
e66bd25b5c
commit
661950e402
@@ -632,8 +632,8 @@ u32 wallet_channels_first_blocknum(struct wallet *w)
|
|||||||
OPENINGD, CLOSINGD_COMPLETE);
|
OPENINGD, CLOSINGD_COMPLETE);
|
||||||
|
|
||||||
err = sqlite3_step(stmt);
|
err = sqlite3_step(stmt);
|
||||||
if (err == SQLITE_ROW && sqlite3_column_type(stmt, 1) != SQLITE_NULL)
|
if (err == SQLITE_ROW && sqlite3_column_type(stmt, 0) != SQLITE_NULL)
|
||||||
first_blocknum = sqlite3_column_int(stmt, 1);
|
first_blocknum = sqlite3_column_int(stmt, 0);
|
||||||
else
|
else
|
||||||
first_blocknum = UINT32_MAX;
|
first_blocknum = UINT32_MAX;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user