@@ -1337,7 +1337,7 @@ func sendKeySendPayment(t *testing.T, src, dst *HarnessNode,
13371337 stream , err := src .RouterClient .SendPaymentV2 (ctxt , req )
13381338 require .NoError (t , err )
13391339
1340- result , err := getFinalPaymentResult (stream )
1340+ result , err := getPaymentResult (stream , false )
13411341 require .NoError (t , err )
13421342 require .Equal (t , lnrpc .Payment_SUCCEEDED , result .Status )
13431343}
@@ -1397,13 +1397,20 @@ func payPayReqWithSatoshi(t *testing.T, payer *HarnessNode, payReq string,
13971397 ctxt , cancel := context .WithTimeout (ctxb , defaultTimeout )
13981398 defer cancel ()
13991399
1400+ shardSize := uint64 (0 )
1401+
1402+ if cfg .smallShards {
1403+ shardSize = 80_000_000
1404+ }
1405+
14001406 sendReq := & routerrpc.SendPaymentRequest {
14011407 PaymentRequest : payReq ,
14021408 TimeoutSeconds : int32 (PaymentTimeout .Seconds ()),
14031409 FeeLimitMsat : 1_000_000 ,
14041410 MaxParts : cfg .maxShards ,
14051411 OutgoingChanIds : cfg .outgoingChanIDs ,
14061412 AllowSelfPayment : cfg .allowSelfPayment ,
1413+ MaxShardSizeMsat : shardSize ,
14071414 }
14081415
14091416 if cfg .smallShards {
@@ -1413,17 +1420,9 @@ func payPayReqWithSatoshi(t *testing.T, payer *HarnessNode, payReq string,
14131420 stream , err := payer .RouterClient .SendPaymentV2 (ctxt , sendReq )
14141421 require .NoError (t , err )
14151422
1416- if cfg .payStatus == lnrpc .Payment_IN_FLIGHT {
1417- t .Logf ("Waiting for initial stream response..." )
1418- result , err := stream .Recv ()
1419- require .NoError (t , err )
1420-
1421- require .Equal (t , cfg .payStatus , result .Status )
1422-
1423- return
1424- }
1425-
1426- result , err := getFinalPaymentResult (stream )
1423+ result , err := getPaymentResult (
1424+ stream , cfg .payStatus == lnrpc .Payment_IN_FLIGHT ,
1425+ )
14271426 if cfg .errSubStr != "" {
14281427 require .ErrorContains (t , err , cfg .errSubStr )
14291428 } else {
0 commit comments