Skip to content

Commit

Permalink
paymod: Inherit exemptfee modifier data on retry
Browse files Browse the repository at this point in the history
  • Loading branch information
cdecker committed Jul 10, 2020
1 parent 20487e8 commit 6ae5e18
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions plugins/libplugin-pay.c
Original file line number Diff line number Diff line change
Expand Up @@ -1645,9 +1645,13 @@ REGISTER_PAYMENT_MODIFIER(routehints, struct routehints_data *,

static struct exemptfee_data *exemptfee_data_init(struct payment *p)
{
struct exemptfee_data *d = tal(p, struct exemptfee_data);
d->amount = AMOUNT_MSAT(5000);
return d;
if (p->parent == NULL) {
struct exemptfee_data *d = tal(p, struct exemptfee_data);
d->amount = AMOUNT_MSAT(5000);
return d;
} else {
return payment_mod_exemptfee_get_data(p->parent);
}
}

static void exemptfee_cb(struct exemptfee_data *d, struct payment *p)
Expand Down

0 comments on commit 6ae5e18

Please sign in to comment.