mirror of
https://github.com/aljazceru/lightning.git
synced 2026-01-06 07:34:21 +01:00
gossipd: don't use peer softrefs for gossip credit.
We use a "softref" which is a magic pointer which gets NULL'ed when the object is freed. But it's heavy, and a bit tricky to use, and we only use it in gossipd. Instead, keep the nodeid, and do a lookup (now that's fast) if we want to credit the sender for valid gossip. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -75,7 +75,9 @@ struct peer *next_random_peer(struct daemon *daemon UNNEEDED,
|
||||
struct peer_node_id_map_iter *it UNNEEDED)
|
||||
{ fprintf(stderr, "next_random_peer called!\n"); abort(); }
|
||||
/* Generated stub for peer_supplied_good_gossip */
|
||||
void peer_supplied_good_gossip(struct peer *peer UNNEEDED, size_t amount UNNEEDED)
|
||||
void peer_supplied_good_gossip(struct daemon *daemon UNNEEDED,
|
||||
const struct node_id *source_peer UNNEEDED,
|
||||
size_t amount UNNEEDED)
|
||||
{ fprintf(stderr, "peer_supplied_good_gossip called!\n"); abort(); }
|
||||
/* Generated stub for queue_peer_from_store */
|
||||
void queue_peer_from_store(struct peer *peer UNNEEDED,
|
||||
|
||||
Reference in New Issue
Block a user