peer: update cooperative closure unit tests to latest negotiation policy
With the new negotiation policy, we instead just need to ensure that our fee inches closer to the other party’s with each iteration, and that it’s within the proper bounds.
This commit is contained in:
3 files changed
+189
-89
No files matched your search
+7
-2
@@ -1132,8 +1132,13 @@ func (b *breachArbiter) sweepSpendableOutputsTxn(txWeight uint64,
|
||||
totalAmt += input.Amount()
|
||||
}
|
||||
|
||||
feePerWeight := b.cfg.Estimator.EstimateFeePerWeight(1)
|
||||
txFee := btcutil.Amount(txWeight * feePerWeight)
|
||||
// We'll actually attempt to target inclusion within the next two
|
||||
// blocks as we'd like to sweep these funds back into our wallet ASAP.
|
||||
feePerWeight, err := b.cfg.Estimator.EstimateFeePerWeight(2)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
txFee := btcutil.Amount(txWeight * uint64(feePerWeight))
|
||||
|
||||
sweepAmt := int64(totalAmt - txFee)
|
||||
|
||||
|
||||
Reference in new issue
Block a user