@@ -1388,7 +1388,7 @@ func sendKeySendPayment(t *testing.T, src, dst *HarnessNode,
1388
1388
stream , err := src .RouterClient .SendPaymentV2 (ctxt , req )
1389
1389
require .NoError (t , err )
1390
1390
1391
- result , err := getFinalPaymentResult (stream )
1391
+ result , err := getPaymentResult (stream , false )
1392
1392
require .NoError (t , err )
1393
1393
require .Equal (t , lnrpc .Payment_SUCCEEDED , result .Status )
1394
1394
}
@@ -1448,13 +1448,20 @@ func payPayReqWithSatoshi(t *testing.T, payer *HarnessNode, payReq string,
1448
1448
ctxt , cancel := context .WithTimeout (ctxb , defaultTimeout )
1449
1449
defer cancel ()
1450
1450
1451
+ shardSize := uint64 (0 )
1452
+
1453
+ if cfg .smallShards {
1454
+ shardSize = 80_000_000
1455
+ }
1456
+
1451
1457
sendReq := & routerrpc.SendPaymentRequest {
1452
1458
PaymentRequest : payReq ,
1453
1459
TimeoutSeconds : int32 (PaymentTimeout .Seconds ()),
1454
1460
FeeLimitMsat : 1_000_000 ,
1455
1461
MaxParts : cfg .maxShards ,
1456
1462
OutgoingChanIds : cfg .outgoingChanIDs ,
1457
1463
AllowSelfPayment : cfg .allowSelfPayment ,
1464
+ MaxShardSizeMsat : shardSize ,
1458
1465
}
1459
1466
1460
1467
if cfg .smallShards {
@@ -1464,17 +1471,9 @@ func payPayReqWithSatoshi(t *testing.T, payer *HarnessNode, payReq string,
1464
1471
stream , err := payer .RouterClient .SendPaymentV2 (ctxt , sendReq )
1465
1472
require .NoError (t , err )
1466
1473
1467
- if cfg .payStatus == lnrpc .Payment_IN_FLIGHT {
1468
- t .Logf ("Waiting for initial stream response..." )
1469
- result , err := stream .Recv ()
1470
- require .NoError (t , err )
1471
-
1472
- require .Equal (t , cfg .payStatus , result .Status )
1473
-
1474
- return
1475
- }
1476
-
1477
- result , err := getFinalPaymentResult (stream )
1474
+ result , err := getPaymentResult (
1475
+ stream , cfg .payStatus == lnrpc .Payment_IN_FLIGHT ,
1476
+ )
1478
1477
if cfg .errSubStr != "" {
1479
1478
require .ErrorContains (t , err , cfg .errSubStr )
1480
1479
} else {
0 commit comments