mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 15:14:23 +01:00
wallet: delete peers with no channels.
ON DELETE CASCADE goes the other way: we should clean up peers with no channels from db. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
Christian Decker
parent
38a313af0d
commit
81ca1db347
@@ -181,7 +181,7 @@ static void free_peer(struct peer *peer, const char *why)
|
||||
command_fail(peer->opening_cmd, "%s", why);
|
||||
peer->opening_cmd = NULL;
|
||||
}
|
||||
wallet_channel_delete(peer->ld->wallet, peer->channel->id);
|
||||
wallet_channel_delete(peer->ld->wallet, peer->channel->id, peer->dbid);
|
||||
tal_free(peer);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user