Skip to content

Commit 227c4f9

Browse files
Roasbeefguggero
authored andcommitted
itest: wait to propagate balances
We add a 1 second sleep as at times the balances haven't fully propagated, so we'll tend to use a max amount value of 0.
1 parent 9e81c43 commit 227c4f9

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

itest/litd_custom_channels_test.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ func testCustomChannelsLarge(_ context.Context, net *NetworkHarness,
203203
// Print initial channel balances.
204204
logBalance(t.t, nodes, assetID, "initial")
205205

206-
// Try larger invoice payments, first from Charlie to Erin, then half
206+
// Try larger invoice payments, first from Charlie to Fabia, then half
207207
// of the amount back in the other direction.
208208
const fabiaInvoiceAssetAmount = 20_000
209209
invoiceResp := createAssetInvoice(
@@ -215,6 +215,12 @@ func testCustomChannelsLarge(_ context.Context, net *NetworkHarness,
215215
invoiceResp2 := createAssetInvoice(
216216
t.t, dave, charlie, fabiaInvoiceAssetAmount/2, assetID,
217217
)
218+
219+
// Sleep for a second to make sure the balances fully propagated before
220+
// we make the payment. Otherwise, we'll make an RFQ order with a max
221+
// amount of zero.
222+
time.Sleep(time.Second * 1)
223+
218224
payInvoiceWithAssets(t.t, fabia, erin, invoiceResp2, assetID, false)
219225
logBalance(t.t, nodes, assetID, "after invoice 2")
220226

0 commit comments

Comments
 (0)