Merge pull request #5064 from ellemouton/set-coop-close-target-confs
multi: allow setting target confs for co-op close
This commit is contained in:
6 files changed
+37
-5
No files matched your search
+8
-1
@@ -2163,6 +2163,13 @@ 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.
|
||||
@@ -2171,7 +2178,7 @@ func (r *rpcServer) CloseChannel(in *lnrpc.CloseChannelRequest,
|
||||
).FeePerKWeight()
|
||||
feeRate, err := sweep.DetermineFeePerKw(
|
||||
r.server.cc.FeeEstimator, sweep.FeePreference{
|
||||
ConfTarget: uint32(in.TargetConf),
|
||||
ConfTarget: targetConf,
|
||||
FeeRate: satPerKw,
|
||||
},
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user