From 45cdfd2ff75c8d0f73deb2a24c81575760619fce Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Wed, 14 Sep 2022 12:16:34 +0930 Subject: [PATCH] BOLT: update to fix gossip pruning quote. Which I disagreed with, and has been fixed. Signed-off-by: Rusty Russell --- Makefile | 2 +- common/gossip_constants.h | 4 ++-- gossipd/gossipd.c | 4 ++-- gossipd/routing.c | 6 ++---- 4 files changed, 7 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index f746cdd2d..ae3b544a9 100644 --- a/Makefile +++ b/Makefile @@ -23,7 +23,7 @@ CCANDIR := ccan # Where we keep the BOLT RFCs BOLTDIR := ../bolts/ -DEFAULT_BOLTVERSION := 341ec844f13c0c0abc4fe849059fbb98173f9766 +DEFAULT_BOLTVERSION := 48fed66e26b80031d898c6492434fa9926237d64 # Can be overridden on cmdline. BOLTVERSION := $(DEFAULT_BOLTVERSION) diff --git a/common/gossip_constants.h b/common/gossip_constants.h index 436db62a4..345f9126b 100644 --- a/common/gossip_constants.h +++ b/common/gossip_constants.h @@ -62,8 +62,8 @@ /* BOLT #7: * * A node: - * - if a channel's latest `channel_update`s `timestamp` is older than two weeks - * (1209600 seconds): + * - if the `timestamp` of the latest `channel_update` in + * either direction is older than two weeks (1209600 seconds): * - MAY prune the channel. * - MAY ignore the channel. */ diff --git a/gossipd/gossipd.c b/gossipd/gossipd.c index 1926c440e..26be95bd6 100644 --- a/gossipd/gossipd.c +++ b/gossipd/gossipd.c @@ -603,8 +603,8 @@ handled: /* BOLT #7: * * A node: - * - if a channel's latest `channel_update`s `timestamp` is older than two weeks - * (1209600 seconds): + * - if the `timestamp` of the latest `channel_update` in + * either direction is older than two weeks (1209600 seconds): * - MAY prune the channel. * - MAY ignore the channel. */ diff --git a/gossipd/routing.c b/gossipd/routing.c index d9dcdf72b..8e569dec8 100644 --- a/gossipd/routing.c +++ b/gossipd/routing.c @@ -1926,12 +1926,10 @@ void route_prune(struct routing_state *rstate) continue; /* BOLT #7: - * - if a channel's latest `channel_update`s `timestamp` is - * older than two weeks (1209600 seconds): + * - if the `timestamp` of the latest `channel_update` in + * either direction is older than two weeks (1209600 seconds): * - MAY prune the channel. */ - /* FIXME: I disagree with the above quote: it used to say "oldest", which is what we - use here: */ /* This is a fancy way of saying "both ends must refresh!" */ if (!is_halfchan_defined(&chan->half[0]) || chan->half[0].bcast.timestamp < highwater