gossipd: fix the check for node announcement in broadcast_state_check()

There should check if node_id_1 was stored in pubkeys, other than checking scid.
This commit is contained in:
trueptolemy 2019-04-14 22:00:42 +08:00 committed by Rusty Russell
parent bcb287f89b
commit 77236caa91

View File

@ -204,7 +204,7 @@ struct broadcast_state *broadcast_state_check(struct broadcast_state *b,
&timestamp,
&node_id_1, color, alias,
&addresses))
if (!uintmap_get(&channels, scid.u64))
if (!pubkey_set_get(&pubkeys, &node_id_1))
return corrupt(abortstr,
"node announced before channel",
NULL, &node_id_1);