mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-24 01:24:26 +01:00
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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user