tMerge pull request #568 from CodingAnarchy/master - electrum - Electrum Bitcoin wallet HTML git clone https://git.parazyd.org/electrum DIR Log DIR Files DIR Refs DIR Submodules --- DIR commit 426501d5b8f397a236aeb30fdeb6b18b713c903f DIR parent bcc80249969ac1c19195ec6eed921906aa522021 HTML Author: ThomasV <thomasv1@gmx.de> Date: Mon, 10 Feb 2014 13:09:56 +0100 Merge pull request #568 from CodingAnarchy/master update estimated_fee to round up and use proper base of 1000 as calculat... Diffstat: M lib/wallet.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) --- DIR diff --git a/lib/wallet.py b/lib/wallet.py t@@ -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 * t@@ -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