| 2947 | } |
| 2948 | |
| 2949 | static void exemptfee_cb(struct exemptfee_data *d, struct payment *p) |
| 2950 | { |
| 2951 | if (p->step != PAYMENT_STEP_INITIALIZED || p->parent != NULL) |
| 2952 | return payment_continue(p); |
| 2953 | |
| 2954 | if (amount_msat_greater_eq(d->amount, p->constraints.fee_budget)) { |
| 2955 | paymod_log( |
| 2956 | p, LOG_INFORM, |
| 2957 | "Payment fee constraint %s is below exemption threshold, " |
| 2958 | "allowing a maximum fee of %s", |
| 2959 | type_to_string(tmpctx, struct amount_msat, &p->constraints.fee_budget), |
| 2960 | type_to_string(tmpctx, struct amount_msat, &d->amount)); |
| 2961 | p->constraints.fee_budget = d->amount; |
| 2962 | p->start_constraints->fee_budget = d->amount; |
| 2963 | } |
| 2964 | return payment_continue(p); |
| 2965 | } |
| 2966 | |
| 2967 | REGISTER_PAYMENT_MODIFIER(exemptfee, struct exemptfee_data *, |
| 2968 | exemptfee_data_init, exemptfee_cb); |
nothing calls this directly
no test coverage detected