gossipd: actually update own node announcement if needed
When an outdated own node announcement is present, it fails the nannounce_different test and also fails to kick off the forced regen timer. Changelog-Fixed: Node announcements are refreshed more reliably.
This commit is contained in:
parent
a9565f5589
commit
8f196b2d7b
|
@ -287,6 +287,11 @@ static bool update_own_node_announcement(struct daemon *daemon,
|
|||
&only_missing_tlv)) {
|
||||
if (always_refresh)
|
||||
goto send;
|
||||
/* Update if old announcement is at least 7 days old. */
|
||||
if (timestamp > self->bcast.timestamp &&
|
||||
timestamp - self->bcast.timestamp >
|
||||
GOSSIP_PRUNE_INTERVAL(daemon->rstate->dev_fast_gossip_prune) / 2)
|
||||
goto send;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue