| 3240 | } |
| 3241 | |
| 3242 | static struct command_result *exemptfee_cb(struct exemptfee_data *d, struct payment *p) |
| 3243 | { |
| 3244 | if (p->step != PAYMENT_STEP_INITIALIZED || p->parent != NULL) |
| 3245 | return payment_continue(p); |
| 3246 | |
| 3247 | if (amount_msat_greater_eq(d->amount, p->constraints.fee_budget)) { |
| 3248 | paymod_log( |
| 3249 | p, LOG_INFORM, |
| 3250 | "Payment fee constraint %s is below exemption threshold, " |
| 3251 | "allowing a maximum fee of %s", |
| 3252 | fmt_amount_msat(tmpctx, p->constraints.fee_budget), |
| 3253 | fmt_amount_msat(tmpctx, d->amount)); |
| 3254 | p->constraints.fee_budget = d->amount; |
| 3255 | p->start_constraints->fee_budget = d->amount; |
| 3256 | } |
| 3257 | return payment_continue(p); |
| 3258 | } |
| 3259 | |
| 3260 | REGISTER_PAYMENT_MODIFIER(exemptfee, struct exemptfee_data *, |
| 3261 | exemptfee_data_init, exemptfee_cb); |
nothing calls this directly
no test coverage detected