Browse Source

Merge pull request #568 from CodingAnarchy/master

update estimated_fee to round up and use proper base of 1000 as calculat...
283
ThomasV 11 years ago
parent
commit
426501d5b8
  1. 4
      lib/wallet.py

4
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 *
@ -1187,8 +1188,7 @@ class Wallet:
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
fee = self.fee * int(math.ceil(estimated_size/1000.))
return fee

Loading…
Cancel
Save