| 3224 | } |
| 3225 | |
| 3226 | static struct command_result *exemptfee_cb(struct exemptfee_data *d, struct payment *p) |
| 3227 | { |
| 3228 | if (p->step != PAYMENT_STEP_INITIALIZED || p->parent != NULL) |
| 3229 | return payment_continue(p); |
| 3230 | |
| 3231 | if (amount_msat_greater_eq(d->amount, p->constraints.fee_budget)) { |
| 3232 | paymod_log( |
| 3233 | p, LOG_INFORM, |
| 3234 | "Payment fee constraint %s is below exemption threshold, " |
| 3235 | "allowing a maximum fee of %s", |
| 3236 | fmt_amount_msat(tmpctx, p->constraints.fee_budget), |
| 3237 | fmt_amount_msat(tmpctx, d->amount)); |
| 3238 | p->constraints.fee_budget = d->amount; |
| 3239 | p->start_constraints->fee_budget = d->amount; |
| 3240 | } |
| 3241 | return payment_continue(p); |
| 3242 | } |
| 3243 | |
| 3244 | REGISTER_PAYMENT_MODIFIER(exemptfee, struct exemptfee_data *, |
| 3245 | exemptfee_data_init, exemptfee_cb); |
nothing calls this directly
no test coverage detected