mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-07-12 06:02:51 +02:00
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:
@ -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