mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-18 05:12:45 +01:00
channel: only delete saved channels from database
There will be 'unsaved' channels now, with a dbid of 0
This commit is contained in:
parent
99123ddbe4
commit
e15de71375
@ -118,7 +118,8 @@ static void destroy_channel(struct channel *channel)
|
|||||||
void delete_channel(struct channel *channel STEALS)
|
void delete_channel(struct channel *channel STEALS)
|
||||||
{
|
{
|
||||||
struct peer *peer = channel->peer;
|
struct peer *peer = channel->peer;
|
||||||
wallet_channel_close(channel->peer->ld->wallet, channel->dbid);
|
if (channel->dbid != 0)
|
||||||
|
wallet_channel_close(channel->peer->ld->wallet, channel->dbid);
|
||||||
tal_free(channel);
|
tal_free(channel);
|
||||||
|
|
||||||
maybe_delete_peer(peer);
|
maybe_delete_peer(peer);
|
||||||
|
Loading…
Reference in New Issue
Block a user