Skip to content

Commit

Permalink
Merge pull request #3879 from SomberNight/fee_calc_integer_satbyte
Browse files Browse the repository at this point in the history
fee calculation: force back-end to use integer sat/bytes
  • Loading branch information
ecdsa committed Feb 9, 2018
2 parents cccf380 + d8dad74 commit 94ebfd5
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/simple_config.py
Original file line number Diff line number Diff line change
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 94ebfd5

Please sign in to comment.