Skip to content

Commit

Permalink
fix: ignore min_inbound_fee_ppm_delta if inbound_fee_ppm == 0
Browse files Browse the repository at this point in the history
  • Loading branch information
feelancer21 committed Jul 4, 2024
1 parent ce993d4 commit f3b7b44
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion charge_lnd/charge_lnd.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,12 @@ def main():
inbound_base_fee_changed = is_defined(chp.inbound_base_fee_msat) \
and my_policy.inbound_fee_base_msat != chp.inbound_base_fee_msat

# We reset the inbound_fee_ppm to the current policy value if the delta is below our
# specified required minimum. But we advance the inbound_fee_ppm if it is 0.
if is_defined(chp.inbound_fee_ppm) \
and not inbound_base_fee_changed \
and abs(my_policy.inbound_fee_rate_milli_msat - chp.inbound_fee_ppm) < min_inbound_fee_ppm_delta:
and abs(my_policy.inbound_fee_rate_milli_msat - chp.inbound_fee_ppm) < min_inbound_fee_ppm_delta \
and chp.inbound_fee_ppm != 0:

chp.inbound_fee_ppm = my_policy.inbound_fee_rate_milli_msat

Expand Down

0 comments on commit f3b7b44

Please sign in to comment.