From 174645fcbadf4032e0e34fee944f5fbb88c2e596 Mon Sep 17 00:00:00 2001 From: Wilmer Paulino Date: Wed, 27 Mar 2019 13:07:13 -0700 Subject: [PATCH] routing+server: expose DefaultChannelPruneExpiry --- routing/router.go | 4 ++++ server.go | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/routing/router.go b/routing/router.go index 5ef2cb94..7f39063a 100644 --- a/routing/router.go +++ b/routing/router.go @@ -33,6 +33,10 @@ const ( // if we should give up on a payment attempt. This will be used if a // value isn't specified in the LightningNode struct. defaultPayAttemptTimeout = time.Duration(time.Second * 60) + + // DefaultChannelPruneExpiry is the default duration used to determine + // if a channel should be pruned or not. + DefaultChannelPruneExpiry = time.Duration(time.Hour * 24 * 14) ) var ( diff --git a/server.go b/server.go index 0ac45733..6ffbe071 100644 --- a/server.go +++ b/server.go @@ -583,7 +583,7 @@ func newServer(listenAddrs []net.Addr, chanDB *channeldb.DB, cc *chainControl, firstHop, htlcAdd, errorDecryptor, ) }, - ChannelPruneExpiry: time.Duration(time.Hour * 24 * 14), + ChannelPruneExpiry: routing.DefaultChannelPruneExpiry, GraphPruneInterval: time.Duration(time.Hour), QueryBandwidth: func(edge *channeldb.ChannelEdgeInfo) lnwire.MilliSatoshi { // If we aren't on either side of this edge, then we'll