From 77236caa91bc548d24d5e886bcaf659cc1fd4c77 Mon Sep 17 00:00:00 2001 From: trueptolemy <823220586@qq.com> Date: Sun, 14 Apr 2019 22:00:42 +0800 Subject: [PATCH] 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. --- gossipd/broadcast.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gossipd/broadcast.c b/gossipd/broadcast.c index 4ce02fe9f..624ce2431 100644 --- a/gossipd/broadcast.c +++ b/gossipd/broadcast.c @@ -204,7 +204,7 @@ struct broadcast_state *broadcast_state_check(struct broadcast_state *b, ×tamp, &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);