@@ -1365,7 +1365,7 @@ func sendKeySendPayment(t *testing.T, src, dst *HarnessNode,
13651365 stream , err := src .RouterClient .SendPaymentV2 (ctxt , req )
13661366 require .NoError (t , err )
13671367
1368- result , err := getFinalPaymentResult (stream )
1368+ result , err := getPaymentResult (stream , false )
13691369 require .NoError (t , err )
13701370 require .Equal (t , lnrpc .Payment_SUCCEEDED , result .Status )
13711371}
@@ -1425,13 +1425,20 @@ func payPayReqWithSatoshi(t *testing.T, payer *HarnessNode, payReq string,
14251425 ctxt , cancel := context .WithTimeout (ctxb , defaultTimeout )
14261426 defer cancel ()
14271427
1428+ shardSize := uint64 (0 )
1429+
1430+ if cfg .smallShards {
1431+ shardSize = 80_000_000
1432+ }
1433+
14281434 sendReq := & routerrpc.SendPaymentRequest {
14291435 PaymentRequest : payReq ,
14301436 TimeoutSeconds : int32 (PaymentTimeout .Seconds ()),
14311437 FeeLimitMsat : 1_000_000 ,
14321438 MaxParts : cfg .maxShards ,
14331439 OutgoingChanIds : cfg .outgoingChanIDs ,
14341440 AllowSelfPayment : cfg .allowSelfPayment ,
1441+ MaxShardSizeMsat : shardSize ,
14351442 }
14361443
14371444 if cfg .smallShards {
@@ -1441,17 +1448,9 @@ func payPayReqWithSatoshi(t *testing.T, payer *HarnessNode, payReq string,
14411448 stream , err := payer .RouterClient .SendPaymentV2 (ctxt , sendReq )
14421449 require .NoError (t , err )
14431450
1444- if cfg .payStatus == lnrpc .Payment_IN_FLIGHT {
1445- t .Logf ("Waiting for initial stream response..." )
1446- result , err := stream .Recv ()
1447- require .NoError (t , err )
1448-
1449- require .Equal (t , cfg .payStatus , result .Status )
1450-
1451- return
1452- }
1453-
1454- result , err := getFinalPaymentResult (stream )
1451+ result , err := getPaymentResult (
1452+ stream , cfg .payStatus == lnrpc .Payment_IN_FLIGHT ,
1453+ )
14551454 if cfg .errSubStr != "" {
14561455 require .ErrorContains (t , err , cfg .errSubStr )
14571456 } else {
0 commit comments