mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-02-22 06:41:44 +01:00
lightningd: don't create a second peer on stub recover if one already exists.
This was confusing to debug, but if the peer already exists we must not create a second one. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
bf549130d6
commit
0b4b4c5e03
1 changed files with 4 additions and 1 deletions
|
@ -1473,7 +1473,10 @@ static struct channel *stub_chan(struct command *cmd,
|
|||
log_debug(cmd->ld->log, "channel %s already exists!",
|
||||
fmt_channel_id(tmpctx, &cid));
|
||||
return NULL;
|
||||
} else {
|
||||
}
|
||||
|
||||
peer = peer_by_id(cmd->ld, &nodeid);
|
||||
if (!peer) {
|
||||
struct wireaddr_internal wint;
|
||||
|
||||
wint.itype = ADDR_INTERNAL_WIREADDR;
|
||||
|
|
Loading…
Add table
Reference in a new issue