mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-03-02 18:35:00 +01:00
wallet: Set shutdown keyindex to -1 if not set
Was using unsigned ints before, which is just plain wrong. Signed-off-by: Christian Decker <decker.christian@gmail.com>
This commit is contained in:
parent
c0aefad8e3
commit
50ee067393
1 changed files with 2 additions and 2 deletions
|
@ -499,7 +499,7 @@ static bool wallet_stmt2channel(struct wallet *w, sqlite3_stmt *stmt,
|
|||
chan->peer->local_shutdown_idx = sqlite3_column_int64(stmt, col++);
|
||||
} else {
|
||||
chan->peer->remote_shutdown_scriptpubkey = tal_free(chan->peer->remote_shutdown_scriptpubkey);
|
||||
chan->peer->local_shutdown_idx = 0;
|
||||
chan->peer->local_shutdown_idx = -1;
|
||||
col += 2;
|
||||
}
|
||||
|
||||
|
@ -691,7 +691,7 @@ bool wallet_channel_save(struct wallet *w, struct wallet_channel *chan){
|
|||
" push_msatoshi=%"PRIu64","
|
||||
" msatoshi_local=%s,"
|
||||
" shutdown_scriptpubkey_remote='%s',"
|
||||
" shutdown_keyidx_local=%"PRIu64","
|
||||
" shutdown_keyidx_local=%"PRId64","
|
||||
" channel_config_local=%"PRIu64","
|
||||
" last_tx=%s, last_sig=%s"
|
||||
" WHERE id=%"PRIu64,
|
||||
|
|
Loading…
Add table
Reference in a new issue