mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-17 19:03:42 +01:00
gossip: Deduplicate short_channel_id checks
Signed-off-by: Christian Decker <decker.christian@gmail.com>
This commit is contained in:
parent
e2f5e4bb3c
commit
fa1806da61
@ -618,6 +618,11 @@ const struct short_channel_id *handle_channel_announcement(
|
||||
tal_free(tag);
|
||||
|
||||
/* FIXME: Handle duplicates as per BOLT #7 */
|
||||
|
||||
if (find_pending_cannouncement(rstate, &pending->short_channel_id) != NULL) {
|
||||
/* Drop it like it's hot */
|
||||
return tal_free(pending);
|
||||
}
|
||||
list_add_tail(&rstate->pending_cannouncement, &pending->list);
|
||||
return &pending->short_channel_id;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user