aboutsummaryrefslogtreecommitdiff
path: root/qa/rpc-tests/wallet.py
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2016-06-13 19:36:01 +0200
committerMarcoFalke <falke.marco@gmail.com>2016-06-13 21:34:41 +0200
commitfa26c420bfb7dbad6781f31f222a66ef52f2ae45 (patch)
treeef66821d317ca074de5a350526b88f90e2e1f9f4 /qa/rpc-tests/wallet.py
parent44c1b1c9bb54082625c7ad76af25473abf79f866 (diff)
downloadbitcoin-fa26c420bfb7dbad6781f31f222a66ef52f2ae45.tar.xz
[qa] util: Move check_fee_amount out of wallet.py
Diffstat (limited to 'qa/rpc-tests/wallet.py')
-rwxr-xr-xqa/rpc-tests/wallet.py7
1 files changed, 1 insertions, 6 deletions
diff --git a/qa/rpc-tests/wallet.py b/qa/rpc-tests/wallet.py
index 9dda712f4f..0b7eb52f07 100755
--- a/qa/rpc-tests/wallet.py
+++ b/qa/rpc-tests/wallet.py
@@ -11,12 +11,7 @@ class WalletTest (BitcoinTestFramework):
def check_fee_amount(self, curr_balance, balance_with_fee, fee_per_byte, tx_size):
"""Return curr_balance after asserting the fee was in range"""
fee = balance_with_fee - curr_balance
- target_fee = fee_per_byte * tx_size
- if fee < target_fee:
- raise AssertionError("Fee of %s BTC too low! (Should be %s BTC)"%(str(fee), str(target_fee)))
- # allow the node's estimation to be at most 2 bytes off
- if fee > fee_per_byte * (tx_size + 2):
- raise AssertionError("Fee of %s BTC too high! (Should be %s BTC)"%(str(fee), str(target_fee)))
+ assert_fee_amount(fee, tx_size, fee_per_byte * 1000)
return curr_balance
def __init__(self):