@@ -181,6 +181,7 @@ static struct command_result *json_renepay(struct command *cmd, const char *buf,
181
181
const char * description ;
182
182
const char * label ;
183
183
struct route_exclusion * * exclusions ;
184
+ bool mpp_enabled = true;
184
185
185
186
// dev options
186
187
bool * use_shadow ;
@@ -262,6 +263,8 @@ static struct command_result *json_renepay(struct command *cmd, const char *buf,
262
263
* inv_msat = amount_msat (* b12 -> invoice_amount );
263
264
}
264
265
payment_hash = b12 -> invoice_payment_hash ;
266
+ mpp_enabled =
267
+ feature_offered (b12 -> invoice_features , OPT_BASIC_MPP );
265
268
} else {
266
269
b11 = bolt11_decode (tmpctx , invstr ,
267
270
plugin_feature_set (cmd -> plugin ),
@@ -280,6 +283,7 @@ static struct command_result *json_renepay(struct command *cmd, const char *buf,
280
283
inv_msat = b11 -> msat ;
281
284
invexpiry = b11 -> timestamp + b11 -> expiry ;
282
285
payment_hash = & b11 -> payment_hash ;
286
+ mpp_enabled = feature_offered (b11 -> features , OPT_BASIC_MPP );
283
287
}
284
288
285
289
/* === Set default values for non-trivial constraints === */
@@ -396,7 +400,8 @@ static struct command_result *json_renepay(struct command *cmd, const char *buf,
396
400
* min_prob_success_millionths ,
397
401
* base_prob_success_millionths , use_shadow ,
398
402
cast_const2 (const struct route_exclusion * * ,
399
- exclusions )) ||
403
+ exclusions ),
404
+ mpp_enabled ) ||
400
405
!payment_refresh (payment ))
401
406
return command_fail (
402
407
cmd , PLUGIN_ERROR ,
@@ -431,7 +436,8 @@ static struct command_result *json_renepay(struct command *cmd, const char *buf,
431
436
* min_prob_success_millionths ,
432
437
* base_prob_success_millionths , use_shadow ,
433
438
cast_const2 (const struct route_exclusion * * ,
434
- exclusions )) ||
439
+ exclusions ),
440
+ mpp_enabled ) ||
435
441
!payment_refresh (payment ))
436
442
return command_fail (
437
443
cmd , PLUGIN_ERROR ,
0 commit comments