From: CodingAnarchy Date: Mon, 10 Feb 2014 08:24:47 +0000 (-0700) Subject: update estimated_fee to round up and use proper base of 1000 as calculation per issue... X-Git-Url: https://git.novaco.in/?a=commitdiff_plain;h=cbb99e6585ab47b1aa7ad13478889c8d3f7e5b56;p=electrum-nvc.git update estimated_fee to round up and use proper base of 1000 as calculation per issue #527 --- diff --git a/lib/wallet.py b/lib/wallet.py index fd9a103..42e1b49 100644 --- a/lib/wallet.py +++ b/lib/wallet.py @@ -29,6 +29,7 @@ import random import aes import Queue import time +import math from util import print_msg, print_error, format_satoshis from bitcoin import * @@ -1186,9 +1187,8 @@ class Wallet: self.storage.put('fee_per_kb', self.fee, True) def estimated_fee(self, inputs): - estimated_size = len(inputs) * 180 + 80 # this assumes non-compressed keys - fee = self.fee * int(round(estimated_size/1024.)) - if fee == 0: fee = self.fee + estimated_size = len(inputs) * 180 + 80 # this assumes non-compressed keys + fee = self.fee * int(math.ceil(estimated_size/1000.)) return fee