1
0
mirror of https://github.com/lightning/bolts.git synced 2024-11-19 10:00:04 +01:00

BOLT07: prune if oldest channel_update is > 2 weeks old

This commit is contained in:
Conner Fromknecht 2020-04-13 14:43:26 -07:00 committed by Rusty Russell
parent b4132ff240
commit 7e8c478aef

View File

@ -981,7 +981,7 @@ A node:
#### Requirements #### Requirements
A node: A node:
- if a channel's latest `channel_update`s `timestamp` is older than two weeks - if a channel's oldest `channel_update`s `timestamp` is older than two weeks
(1209600 seconds): (1209600 seconds):
- MAY prune the channel. - MAY prune the channel.
- MAY ignore the channel. - MAY ignore the channel.
@ -999,6 +999,11 @@ unlikely to be part of a computed route, since they would be partitioned off
from the rest of the network; however, they would remain in the local network from the rest of the network; however, they would remain in the local network
view would be forwarded to other peers indefinitely. view would be forwarded to other peers indefinitely.
The oldest `channel_update` is used to prune the channel since both sides need
to be active in order for the channel to be usable. Doing so prunes channels
even if one side continues to send fresh `channel_update`s but the other node
has disappeared.
## Recommendations for Routing ## Recommendations for Routing
When calculating a route for an HTLC, both the `cltv_expiry_delta` and the fee When calculating a route for an HTLC, both the `cltv_expiry_delta` and the fee