From 61f79d890cda3ab4b936b25d45ae594ebaeca560 Mon Sep 17 00:00:00 2001 From: Alex Bosworth Date: Fri, 19 Mar 2021 18:43:07 -0700 Subject: [PATCH] rpcserver: revert target conf to previous behavior Previously the rpcserver would not use the remote conf target as its local conf target and this behavior is desirable. --- rpcserver.go | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/rpcserver.go b/rpcserver.go index 42e2a17b..953b46b0 100644 --- a/rpcserver.go +++ b/rpcserver.go @@ -2168,13 +2168,6 @@ func (r *rpcServer) CloseChannel(in *lnrpc.CloseChannelRequest, "is offline (try force closing it instead): %v", err) } - // If conf-target is not set then use the conf-target used for - // co-op closes that are initiated by the remote peer. - targetConf := uint32(in.TargetConf) - if targetConf == 0 { - targetConf = r.cfg.CoopCloseTargetConfs - } - // Based on the passed fee related parameters, we'll determine // an appropriate fee rate for the cooperative closure // transaction. @@ -2183,7 +2176,7 @@ func (r *rpcServer) CloseChannel(in *lnrpc.CloseChannelRequest, ).FeePerKWeight() feeRate, err := sweep.DetermineFeePerKw( r.server.cc.FeeEstimator, sweep.FeePreference{ - ConfTarget: targetConf, + ConfTarget: uint32(in.TargetConf), FeeRate: satPerKw, }, )