mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-24 01:24:26 +01:00
gossipd: keep index of node and channel announcements.
This lets detect if a node announce preceeds a channel announce once we delete the node announcement. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
Christian Decker
parent
294c76e749
commit
a38c619486
@@ -52,6 +52,8 @@ struct chan {
|
||||
|
||||
/* NULL if not announced yet (ie. not public). */
|
||||
const u8 *channel_announce;
|
||||
/* Index in broadcast map, if public (otherwise 0) */
|
||||
u64 channel_announcement_index;
|
||||
|
||||
u64 satoshis;
|
||||
};
|
||||
@@ -101,7 +103,8 @@ struct node {
|
||||
|
||||
/* Cached `node_announcement` we might forward to new peers (or NULL). */
|
||||
const u8 *node_announcement;
|
||||
bool node_announcement_public;
|
||||
/* If public, this is non-zero. */
|
||||
u64 node_announcement_index;
|
||||
};
|
||||
|
||||
const secp256k1_pubkey *node_map_keyof_node(const struct node *n);
|
||||
|
||||
Reference in New Issue
Block a user