@@ -1388,7 +1388,7 @@ func sendKeySendPayment(t *testing.T, src, dst *HarnessNode,
13881388	stream , err  :=  src .RouterClient .SendPaymentV2 (ctxt , req )
13891389	require .NoError (t , err )
13901390
1391- 	result , err  :=  getFinalPaymentResult (stream )
1391+ 	result , err  :=  getPaymentResult (stream ,  false )
13921392	require .NoError (t , err )
13931393	require .Equal (t , lnrpc .Payment_SUCCEEDED , result .Status )
13941394}
@@ -1448,13 +1448,20 @@ func payPayReqWithSatoshi(t *testing.T, payer *HarnessNode, payReq string,
14481448	ctxt , cancel  :=  context .WithTimeout (ctxb , defaultTimeout )
14491449	defer  cancel ()
14501450
1451+ 	shardSize  :=  uint64 (0 )
1452+ 
1453+ 	if  cfg .smallShards  {
1454+ 		shardSize  =  80_000_000 
1455+ 	}
1456+ 
14511457	sendReq  :=  & routerrpc.SendPaymentRequest {
14521458		PaymentRequest :   payReq ,
14531459		TimeoutSeconds :   int32 (PaymentTimeout .Seconds ()),
14541460		FeeLimitMsat :     1_000_000 ,
14551461		MaxParts :         cfg .maxShards ,
14561462		OutgoingChanIds :  cfg .outgoingChanIDs ,
14571463		AllowSelfPayment : cfg .allowSelfPayment ,
1464+ 		MaxShardSizeMsat : shardSize ,
14581465	}
14591466
14601467	if  cfg .smallShards  {
@@ -1464,17 +1471,9 @@ func payPayReqWithSatoshi(t *testing.T, payer *HarnessNode, payReq string,
14641471	stream , err  :=  payer .RouterClient .SendPaymentV2 (ctxt , sendReq )
14651472	require .NoError (t , err )
14661473
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+ 	)
14781477	if  cfg .errSubStr  !=  ""  {
14791478		require .ErrorContains (t , err , cfg .errSubStr )
14801479	} else  {
0 commit comments