1
0

better segwit tx size estimation

This commit is contained in:
SomberNight
2017-11-21 23:02:45 +01:00
parent 0da1d4853b
commit a2a25e4738
2 changed files with 28 additions and 11 deletions

View File

@@ -91,8 +91,9 @@ class CoinChooserBase(PrintError):
buckets[key].append(coin)
def make_Bucket(desc, coins):
size = sum(Transaction.estimated_input_size(coin)
weight = sum(Transaction.estimated_input_weight(coin)
for coin in coins)
size = Transaction.virtual_size_from_weight(weight)
value = sum(coin['value'] for coin in coins)
return Bucket(desc, size, value, coins)