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.
This commit is contained in:
Alex Bosworth 2021-03-19 18:43:07 -07:00 committed by GitHub
parent b1309277b9
commit 61f79d890c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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,
},
)