99
99
)
100
100
101
101
const (
102
- fundingAmount = 50_000
102
+ fundingAmount = 50_000
103
+ eventuallyTimeout = time .Second * 30
104
+ eventuallyTicker = time .Millisecond * 250
103
105
)
104
106
105
107
// testCustomChannels tests that we can create a network with custom channels
@@ -386,7 +388,7 @@ func testCustomChannels(_ context.Context, net *NetworkHarness,
386
388
// ------------
387
389
// Test case 1: Send a direct keysend payment from Charlie to Dave.
388
390
// ------------
389
- const keySendAmount = 100
391
+ const keySendAmount = 1000
390
392
sendAssetKeySendPayment (
391
393
t .t , charlie , dave , keySendAmount , assetID , fn .None [int64 ](),
392
394
)
@@ -395,6 +397,12 @@ func testCustomChannels(_ context.Context, net *NetworkHarness,
395
397
charlieAssetBalance -= keySendAmount
396
398
daveAssetBalance += keySendAmount
397
399
400
+ require .Eventually (t .t , func () bool {
401
+ local , _ := getAssetChannelBalance (t .t , dave , assetID , false )
402
+
403
+ return local == daveAssetBalance
404
+ }, eventuallyTimeout , eventuallyTicker )
405
+
398
406
// We should be able to send the 100 assets back immediately, because
399
407
// there is enough on-chain balance on Dave's side to be able to create
400
408
// an HTLC.
@@ -930,7 +938,7 @@ func testCustomChannelsGroupedAsset(_ context.Context, net *NetworkHarness,
930
938
// ------------
931
939
// Test case 1: Send a direct keysend payment from Charlie to Dave.
932
940
// ------------
933
- const keySendAmount = 100
941
+ const keySendAmount = 1000
934
942
sendAssetKeySendPayment (
935
943
t .t , charlie , dave , keySendAmount , assetID , fn .None [int64 ](),
936
944
)
@@ -939,6 +947,12 @@ func testCustomChannelsGroupedAsset(_ context.Context, net *NetworkHarness,
939
947
charlieAssetBalance -= keySendAmount
940
948
daveAssetBalance += keySendAmount
941
949
950
+ require .Eventually (t .t , func () bool {
951
+ local , _ := getAssetChannelBalance (t .t , dave , assetID , false )
952
+
953
+ return local == daveAssetBalance
954
+ }, eventuallyTimeout , eventuallyTicker )
955
+
942
956
// We should be able to send the 100 assets back immediately, because
943
957
// there is enough on-chain balance on Dave's side to be able to create
944
958
// an HTLC.
0 commit comments