mirror of
https://github.com/lightninglabs/loop.git
synced 2026-08-13 12:33:03 +02:00
loopout: fix flaky loopout preimage push and expiry tests
This commit is contained in:
parent
5c04b8db05
commit
d3401f809f
1 changed files with 10 additions and 0 deletions
|
|
@ -581,6 +581,11 @@ func testPreimagePush(t *testing.T) {
|
|||
// preimage is not revealed, we also do not expect a preimage push.
|
||||
expiryChan <- testTime
|
||||
|
||||
// Since we don't have a reliable mechanism to non-intrusively avoid
|
||||
// races by setting the fee estimate too soon, let's sleep here a bit
|
||||
// to ensure the first sweep fails.
|
||||
time.Sleep(500 * time.Millisecond)
|
||||
|
||||
// Now we decrease our fees for the swap's confirmation target to less
|
||||
// than the maximum miner fee.
|
||||
ctx.Lnd.SetFeeEstimate(testReq.SweepConfTarget, chainfee.SatPerKWeight(
|
||||
|
|
@ -760,6 +765,11 @@ func testExpiryBeforeReveal(t *testing.T) {
|
|||
// won't attempt a sweep at this point.
|
||||
expiryChan <- testTime
|
||||
|
||||
// Since we don't have a reliable mechanism to non-intrusively avoid
|
||||
// races by setting the fee estimate too soon, let's sleep here a bit
|
||||
// to ensure the first sweep fails.
|
||||
time.Sleep(500 * time.Millisecond)
|
||||
|
||||
// Now we decrease our conf target to less than our max miner fee.
|
||||
lnd.SetFeeEstimate(testReq.SweepConfTarget, chainfee.SatPerKWeight(
|
||||
testReq.MaxMinerFee/2,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue