pytest: use maxparts=1 not the soon-to-be-deprecated "auto.no_mpp_support" layer.
What changed, and why it matters
This is a routine test-only change in Core Lightning. It updates pytest test code to stop using a soon-to-be-deprecated routing layer name ('auto.no_mpp_support') and instead uses a new 'maxparts=1' parameter to achieve the same test behavior. There is no change to production code, no security fix, and no vulnerability.
No security action needed. Treat as normal maintenance/test refactoring.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit modifies tests/test_askrene.py only. It adds a ‘maxparts=50’ default parameter to the helper function check_getroute_paths(), passes it through to getroutes(), and replaces all uses of the ‘auto.no_mpp_support’ layer with ‘maxparts=1’ (and empty layers where appropriate). This is a test refactoring to align with an API deprecation; no node behavior changes.
Changed components
tests/test_askrene.pyInspect captured patch +13 / −7
diff --git a/tests/test_askrene.py b/tests/test_askrene.py
index 53965fab..8c87d068 100644
--- a/tests/test_askrene.py
+++ b/tests/test_askrene.py
@@ -661,6 +661,7 @@ def check_getroute_paths(node,
destination,
amount_msat,
paths,
+ maxparts=50,
layers=[],
maxfee_msat=1000,
final_cltv=99):
@@ -670,7 +671,8 @@ def check_getroute_paths(node,
amount_msat=amount_msat,
layers=layers,
maxfee_msat=maxfee_msat,
- final_cltv=final_cltv)
+ final_cltv=final_cltv,
+ maxparts=maxparts)
assert getroutes['probability_ppm'] <= 1000000
# Total delivered should be amount we told it to send.
@@ -843,7 +845,8 @@ def test_getroutes_single_path(node_factory):
source=nodemap[1],
destination=nodemap[2],
amount_msat=10000001,
- layers=["auto.no_mpp_support"],
+ layers=[],
+ maxparts=1,
maxfee_msat=1000,
final_cltv=99,
)
@@ -864,7 +867,7 @@ def test_getroutes_single_path(node_factory):
}
]
],
- layers=["auto.no_mpp_support"],
+ maxparts=1,
)
# To be able to route this amount two parts are needed, therefore a single
@@ -875,7 +878,8 @@ def test_getroutes_single_path(node_factory):
source=nodemap[0],
destination=nodemap[2],
amount_msat=10000001,
- layers=["auto.no_mpp_support"],
+ layers=[],
+ maxparts=1,
maxfee_msat=1000,
final_cltv=99,
)
@@ -902,7 +906,7 @@ def test_getroutes_single_path(node_factory):
},
]
],
- layers=["auto.no_mpp_support"],
+ maxparts=1,
)
@@ -2143,9 +2147,10 @@ def test_excessive_fee_cost(node_factory):
source=l1.info["id"],
destination=node1,
amount_msat=one_btc // 2,
- layers=["mylayer", "auto.no_mpp_support"],
+ layers=["mylayer"],
maxfee_msat=1000,
final_cltv=5,
+ maxparts=1,
)
@@ -2627,7 +2632,8 @@ def test_impossible_payment(node_factory):
source=node1,
destination=node3,
amount_msat=pay_amt,
- layers=["mylayer", "auto.no_mpp_support"],
+ layers=["mylayer"],
maxfee_msat=2 * pay_amt,
final_cltv=5,
+ maxparts=1,
)
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.