@@ -181,6 +181,7 @@ static struct command_result *json_renepay(struct command *cmd, const char *buf,
181181 const char * description ;
182182 const char * label ;
183183 struct route_exclusion * * exclusions ;
184+ bool mpp_enabled = true;
184185
185186 // dev options
186187 bool * use_shadow ;
@@ -262,6 +263,8 @@ static struct command_result *json_renepay(struct command *cmd, const char *buf,
262263 * inv_msat = amount_msat (* b12 -> invoice_amount );
263264 }
264265 payment_hash = b12 -> invoice_payment_hash ;
266+ mpp_enabled =
267+ feature_offered (b12 -> invoice_features , OPT_BASIC_MPP );
265268 } else {
266269 b11 = bolt11_decode (tmpctx , invstr ,
267270 plugin_feature_set (cmd -> plugin ),
@@ -280,6 +283,7 @@ static struct command_result *json_renepay(struct command *cmd, const char *buf,
280283 inv_msat = b11 -> msat ;
281284 invexpiry = b11 -> timestamp + b11 -> expiry ;
282285 payment_hash = & b11 -> payment_hash ;
286+ mpp_enabled = feature_offered (b11 -> features , OPT_BASIC_MPP );
283287 }
284288
285289 /* === Set default values for non-trivial constraints === */
@@ -396,7 +400,8 @@ static struct command_result *json_renepay(struct command *cmd, const char *buf,
396400 * min_prob_success_millionths ,
397401 * base_prob_success_millionths , use_shadow ,
398402 cast_const2 (const struct route_exclusion * * ,
399- exclusions )) ||
403+ exclusions ),
404+ mpp_enabled ) ||
400405 !payment_refresh (payment ))
401406 return command_fail (
402407 cmd , PLUGIN_ERROR ,
@@ -431,7 +436,8 @@ static struct command_result *json_renepay(struct command *cmd, const char *buf,
431436 * min_prob_success_millionths ,
432437 * base_prob_success_millionths , use_shadow ,
433438 cast_const2 (const struct route_exclusion * * ,
434- exclusions )) ||
439+ exclusions ),
440+ mpp_enabled ) ||
435441 !payment_refresh (payment ))
436442 return command_fail (
437443 cmd , PLUGIN_ERROR ,
0 commit comments