mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-24 01:24:26 +01:00
wallet: don't clear reference from channel to peers table when we close channel.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -2282,13 +2282,12 @@ void wallet_channel_close(struct wallet *w, u64 wallet_id)
|
||||
db_bind_u64(stmt, 0, wallet_id);
|
||||
db_exec_prepared_v2(take(stmt));
|
||||
|
||||
/* Set the channel to closed and disassociate with peer */
|
||||
/* Set the channel to closed */
|
||||
stmt = db_prepare_v2(w->db, SQL("UPDATE channels "
|
||||
"SET state=?, peer_id=? "
|
||||
"SET state=? "
|
||||
"WHERE channels.id=?"));
|
||||
db_bind_u64(stmt, 0, CLOSED);
|
||||
db_bind_null(stmt, 1);
|
||||
db_bind_u64(stmt, 2, wallet_id);
|
||||
db_bind_u64(stmt, 1, wallet_id);
|
||||
db_exec_prepared_v2(take(stmt));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user