mirror of
https://github.com/lightninglabs/loop.git
synced 2026-08-13 12:33:03 +02:00
loopout: fix fee estimate failure if conf_target=1
The fee estimator fails if conf_target=1. Use conf_target=2 instead. Fix https://github.com/lightninglabs/loop/issues/898
This commit is contained in:
parent
a253b40062
commit
ddeb43d293
2 changed files with 10 additions and 10 deletions
|
|
@ -136,14 +136,14 @@ func (p *loopOutSweepFeerateProvider) GetConfTargetAndFeeRate(
|
|||
// opens for the client to sweep.
|
||||
blocksUntilExpiry := contract.CltvExpiry - height
|
||||
|
||||
// Find confTarget. If the sweep has expired, use confTarget=1, because
|
||||
// confTarget must be positive.
|
||||
// Find confTarget. If the sweep has expired, use confTarget=2, because
|
||||
// fee estimator fails if confTarget < 2.
|
||||
confTarget := blocksUntilExpiry
|
||||
if confTarget <= 0 {
|
||||
if confTarget < 2 {
|
||||
log.Infof("Swap %x has expired (blocksUntilExpiry=%d), using "+
|
||||
"confTarget=1 for it.", swapHash[:6], blocksUntilExpiry)
|
||||
"confTarget=2 for it.", swapHash[:6], blocksUntilExpiry)
|
||||
|
||||
confTarget = 1
|
||||
confTarget = 2
|
||||
}
|
||||
|
||||
feeFactor := float64(1.0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue