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 @@ -581,6 +581,11 @@ func testPreimagePush(t *testing.T) {
581581 // preimage is not revealed, we also do not expect a preimage push.
582582 expiryChan <- testTime
583583
584+ // Since we don't have a reliable mechanism to non-intrusively avoid
585+ // races by setting the fee estimate too soon, let's sleep here a bit
586+ // to ensure the first sweep fails.
587+ time .Sleep (500 * time .Millisecond )
588+
584589 // Now we decrease our fees for the swap's confirmation target to less
585590 // than the maximum miner fee.
586591 ctx .Lnd .SetFeeEstimate (testReq .SweepConfTarget , chainfee .SatPerKWeight (
@@ -760,6 +765,11 @@ func testExpiryBeforeReveal(t *testing.T) {
760765 // won't attempt a sweep at this point.
761766 expiryChan <- testTime
762767
768+ // Since we don't have a reliable mechanism to non-intrusively avoid
769+ // races by setting the fee estimate too soon, let's sleep here a bit
770+ // to ensure the first sweep fails.
771+ time .Sleep (500 * time .Millisecond )
772+
763773 // Now we decrease our conf target to less than our max miner fee.
764774 lnd .SetFeeEstimate (testReq .SweepConfTarget , chainfee .SatPerKWeight (
765775 testReq .MaxMinerFee / 2 ,
You can’t perform that action at this time.
0 commit comments