File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -572,6 +572,11 @@ func testPreimagePush(t *testing.T) {
572572 // preimage is not revealed, we also do not expect a preimage push.
573573 expiryChan <- testTime
574574
575+ // Since we don't have a reliable mechanism to non-intursively avoid
576+ // races by setting the fee estimate too soon, let's sleep here a bit
577+ // to ensure the first sweep fails.
578+ time .Sleep (500 * time .Millisecond )
579+
575580 // Now we decrease our fees for the swap's confirmation target to less
576581 // than the maximum miner fee.
577582 ctx .Lnd .SetFeeEstimate (testReq .SweepConfTarget , chainfee .SatPerKWeight (
@@ -751,6 +756,11 @@ func testExpiryBeforeReveal(t *testing.T) {
751756 // won't attempt a sweep at this point.
752757 expiryChan <- testTime
753758
759+ // Since we don't have a reliable mechanism to non-intursively avoid
760+ // races by setting the fee estimate too soon, let's sleep here a bit
761+ // to ensure the first sweep fails.
762+ time .Sleep (500 * time .Millisecond )
763+
754764 // Now we decrease our conf target to less than our max miner fee.
755765 lnd .SetFeeEstimate (testReq .SweepConfTarget , chainfee .SatPerKWeight (
756766 testReq .MaxMinerFee / 2 ,
You can’t perform that action at this time.
0 commit comments