lightningd: delete all trace of nonexistent channels.
We're going to start loading them into memory for nicer responses if people try to reestablish closed channels, but we don't care about ones which were never actually opened. We could add a new state, but easier to simply remove them. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -519,7 +519,7 @@ void channel_errmsg(struct channel *channel,
|
||||
if (channel_state_uncommitted(channel->state)) {
|
||||
log_info(channel->log, "%s", "Unsaved peer failed."
|
||||
" Deleting channel.");
|
||||
delete_channel(channel);
|
||||
delete_channel(channel, false);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -3432,7 +3432,7 @@ static void process_dev_forget_channel(struct bitcoind *bitcoind UNUSED,
|
||||
forget->channel->error = towire_errorfmt(forget->channel,
|
||||
&forget->channel->cid,
|
||||
"dev_forget_channel");
|
||||
delete_channel(forget->channel);
|
||||
delete_channel(forget->channel, false);
|
||||
|
||||
was_pending(command_success(forget->cmd, response));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user