mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-03-15 11:59:16 +01:00
gossipd: fix unknown channel_update recovery logic.
An "err" is only returned if the channel_update is malformed: more common is that it's fine, but we don't know the scid. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
4a4f85dd3f
commit
f6191c8ef9
1 changed files with 5 additions and 4 deletions
|
@ -261,11 +261,12 @@ static u8 *handle_channel_update_msg(struct peer *peer, const u8 *msg)
|
|||
unknown_scid.u64 = 0;
|
||||
err = handle_channel_update(peer->daemon->rstate, msg, peer,
|
||||
&unknown_scid, false);
|
||||
if (err) {
|
||||
if (unknown_scid.u64 != 0)
|
||||
query_unknown_channel(peer->daemon, peer, &unknown_scid);
|
||||
if (err)
|
||||
return err;
|
||||
}
|
||||
|
||||
/* If it's an unknown channel, ask someone about it */
|
||||
if (unknown_scid.u64 != 0)
|
||||
query_unknown_channel(peer->daemon, peer, &unknown_scid);
|
||||
|
||||
/*~ As a nasty compromise in the spec, we only forward `channel_announce`
|
||||
* once we have a `channel_update`; the channel isn't *usable* for
|
||||
|
|
Loading…
Add table
Reference in a new issue