mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 15:14:23 +01:00
plugins/pay: fix unnecessary code.
1. p is a child of cmd, so it's freed by command_failed. 2. cltv_budget is set a few lines up to the same thing already. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -2476,12 +2476,10 @@ static struct command_result *json_paymod(struct command *cmd,
|
|||||||
|
|
||||||
if (!amount_msat_fee(&p->constraints.fee_budget, p->amount, 0,
|
if (!amount_msat_fee(&p->constraints.fee_budget, p->amount, 0,
|
||||||
*maxfee_pct_millionths / 100)) {
|
*maxfee_pct_millionths / 100)) {
|
||||||
tal_free(p);
|
|
||||||
return command_fail(
|
return command_fail(
|
||||||
cmd, JSONRPC2_INVALID_PARAMS,
|
cmd, JSONRPC2_INVALID_PARAMS,
|
||||||
"Overflow when computing fee budget, fee rate too high.");
|
"Overflow when computing fee budget, fee rate too high.");
|
||||||
}
|
}
|
||||||
p->constraints.cltv_budget = *maxdelay;
|
|
||||||
|
|
||||||
payment_mod_exemptfee_get_data(p)->amount = *exemptfee;
|
payment_mod_exemptfee_get_data(p)->amount = *exemptfee;
|
||||||
shadow_route = payment_mod_shadowroute_get_data(p);
|
shadow_route = payment_mod_shadowroute_get_data(p);
|
||||||
|
|||||||
Reference in New Issue
Block a user