Skip to content

Commit

Permalink
fix fee limit for --reckless
Browse files Browse the repository at this point in the history
  • Loading branch information
C-Otto committed Dec 29, 2021
1 parent 3ff8c87 commit 46b1335
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions logic.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def get_fee_limit_msat(self):
elif not self.last_hop_channel:
return None

if self.last_hop_channel:
if self.last_hop_channel and not self.reckless:
fee_rate = self.lnd.get_ppm_to(self.last_hop_channel.chan_id)
if fee_rate > MAX_FEE_RATE:
last_hop_alias = self.lnd.get_node_alias(self.last_hop_channel.remote_pubkey)
Expand All @@ -121,7 +121,8 @@ def get_fee_limit_msat(self):
)
else:
fee_limit_msat = self.compute_fee(self.amount, self.fee_factor * fee_rate, policy) * 1_000
fee_limit_msat = max(1_000, fee_limit_msat)
if not self.reckless:
fee_limit_msat = max(1_000, fee_limit_msat)

ppm_limit = int(fee_limit_msat / self.amount * 1_000)

Expand Down

0 comments on commit 46b1335

Please sign in to comment.