From 1d2aba8cd4897f76891ab1a92ae3f886586f16b8 Mon Sep 17 00:00:00 2001 From: Wilmer Paulino Date: Fri, 5 Jul 2019 12:54:28 -0700 Subject: [PATCH 1/2] watchtower/wtpolicy: properly set DefaultSweepFeeRate and MinSweepFeeRate These values were intended to be 10 sat/vbyte and 4 sat/vbyte respectively, but the conversion was done incorrectly. --- watchtower/wtpolicy/policy.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/watchtower/wtpolicy/policy.go b/watchtower/wtpolicy/policy.go index 6fbf71a9..db636b68 100644 --- a/watchtower/wtpolicy/policy.go +++ b/watchtower/wtpolicy/policy.go @@ -27,11 +27,11 @@ const ( // DefaultSweepFeeRate specifies the fee rate used to construct justice // transactions. The value is expressed in satoshis per kilo-weight. - DefaultSweepFeeRate = lnwallet.SatPerKWeight(40000) + DefaultSweepFeeRate = lnwallet.SatPerKWeight(2500) // MinSweepFeeRate is the minimum sweep fee rate a client may use in its - // policy, the current value is 4 sat/kw. - MinSweepFeeRate = lnwallet.SatPerKWeight(4000) + // policy, the current value is 4 sat/vbyte. + MinSweepFeeRate = lnwallet.SatPerKWeight(1000) ) var ( From 99d9e3caeb46cf88bc97ff440ce97efc765c8598 Mon Sep 17 00:00:00 2001 From: Wilmer Paulino Date: Wed, 10 Jul 2019 18:21:14 -0700 Subject: [PATCH 2/2] server: use custom wtclient policy instead of default --- server.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server.go b/server.go index 256b1ebd..11f32cb8 100644 --- a/server.go +++ b/server.go @@ -1104,8 +1104,8 @@ func newServer(listenAddrs []net.Addr, chanDB *channeldb.DB, Dial: cfg.net.Dial, AuthDial: wtclient.AuthDial, DB: towerClientDB, - Policy: wtpolicy.DefaultPolicy(), PrivateTower: cfg.WtClient.PrivateTowers[0], + Policy: policy, ChainHash: *activeNetParams.GenesisHash, MinBackoff: 10 * time.Second, MaxBackoff: 5 * time.Minute,