Skip to content

Commit

Permalink
fee calculation: force back-end to use integer sat/bytes
Browse files Browse the repository at this point in the history
  • Loading branch information
SomberNight committed Feb 8, 2018
1 parent 95c5815 commit d8dad74
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/simple_config.py
Expand Up @@ -428,7 +428,12 @@ def estimate_fee(self, size):

@classmethod
def estimate_fee_for_feerate(cls, fee_per_kb, size):
return int(fee_per_kb * size / 1000.)
# note: We only allow integer sat/byte values atm.
# The GUI for simplicity reasons only displays integer sat/byte,
# and for the sake of consistency, we thus only use integer sat/byte in
# the backend too.
fee_per_byte = int(fee_per_kb / 1000)
return int(fee_per_byte * size)

def update_fee_estimates(self, key, value):
self.fee_estimates[key] = value
Expand Down

0 comments on commit d8dad74

Please sign in to comment.