lightningd: remove checks which prevent us from opening multiple channels.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Added: Protocol: we now support opening multiple channels with the same peer.
This commit is contained in:
Rusty Russell
2022-03-23 09:29:20 +10:30
parent 21e1d68e3b
commit debc1b90d3
3 changed files with 91 additions and 36 deletions

View File

@@ -1782,13 +1782,6 @@ static void accepter_got_offer(struct subd *dualopend,
{
struct openchannel2_payload *payload;
if (peer_any_active_channel(channel->peer, NULL)) {
subd_send_msg(dualopend,
take(towire_dualopend_fail(NULL,
"Already have active channel")));
return;
}
if (channel->open_attempt) {
subd_send_msg(dualopend,
take(towire_dualopend_fail(NULL,
@@ -2584,12 +2577,6 @@ static struct command_result *json_openchannel_init(struct command *cmd,
return command_fail(cmd, FUNDING_UNKNOWN_PEER, "Unknown peer");
}
channel = peer_any_active_channel(peer, NULL);
if (channel) {
return command_fail(cmd, LIGHTNINGD, "Peer already %s",
channel_state_name(channel));
}
channel = peer_any_unsaved_channel(peer, NULL);
if (!channel) {
channel = new_unsaved_channel(peer,