mirror of
https://github.com/aljazceru/lightning.git
synced 2026-02-04 13:44:22 +01:00
wallet: Use int64 when deserializing output value from db
We were using int32 for msatoshi values for outputs, which would overflow for values larger than 2^32. Signed-off-by: Christian Decker <decker.christian@gmail.com>
This commit is contained in:
committed by
Rusty Russell
parent
e97857847a
commit
7865b4a679
@@ -57,7 +57,7 @@ static bool wallet_stmt2output(sqlite3_stmt *stmt, struct utxo *utxo)
|
||||
{
|
||||
sqlite3_column_sha256_double(stmt, 0, &utxo->txid.shad);
|
||||
utxo->outnum = sqlite3_column_int(stmt, 1);
|
||||
utxo->amount = sqlite3_column_int(stmt, 2);
|
||||
utxo->amount = sqlite3_column_int64(stmt, 2);
|
||||
utxo->is_p2sh = sqlite3_column_int(stmt, 3) == p2sh_wpkh;
|
||||
utxo->status = sqlite3_column_int(stmt, 4);
|
||||
utxo->keyindex = sqlite3_column_int(stmt, 5);
|
||||
|
||||
Reference in New Issue
Block a user