aboutsummaryrefslogtreecommitdiff
path: root/qa/rpc-tests/smartfees.py
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2016-04-03 15:35:59 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2016-04-03 15:54:35 +0200
commitff5874bcf7e391acf3b454c11c21636547400818 (patch)
tree5bf4080f939dcb44923edb98f3f13fdf9ae897f3 /qa/rpc-tests/smartfees.py
parente0b3e19816b62fdf6faeda44459f30945241fbd8 (diff)
parent444480649f08e6037f8ac178224b30a82e9ad72e (diff)
Merge #7778: [qa] Bug fixes and refactor
4444806 [qa] mininode: Combine struct.pack format strings (MarcoFalke) faaa3c9 [qa] mininode: Catch exceptions in got_data (MarcoFalke) fa2cea1 [qa] rpc-tests: Properly use integers, floats (MarcoFalke) fa524d9 [qa] Use python2/3 syntax (MarcoFalke)
Diffstat (limited to 'qa/rpc-tests/smartfees.py')
-rwxr-xr-xqa/rpc-tests/smartfees.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/qa/rpc-tests/smartfees.py b/qa/rpc-tests/smartfees.py
index b209ae0c16..2c064ad8a0 100755
--- a/qa/rpc-tests/smartfees.py
+++ b/qa/rpc-tests/smartfees.py
@@ -105,7 +105,7 @@ def check_estimates(node, fees_seen, max_invalid, print_estimates = True):
print([str(all_estimates[e-1]) for e in [1,2,3,6,15,25]])
delta = 1.0e-6 # account for rounding error
last_e = max(fees_seen)
- for e in filter(lambda x: x >= 0, all_estimates):
+ for e in [x for x in all_estimates if x >= 0]:
# Estimates should be within the bounds of what transactions fees actually were:
if float(e)+delta < min(fees_seen) or float(e)-delta > max(fees_seen):
raise AssertionError("Estimated fee (%f) out of range (%f,%f)"
@@ -219,7 +219,7 @@ class EstimateFeeTest(BitcoinTestFramework):
from_index = random.randint(1,2)
(txhex, fee) = small_txpuzzle_randfee(self.nodes[from_index], self.confutxo,
self.memutxo, Decimal("0.005"), min_fee, min_fee)
- tx_kbytes = (len(txhex)/2)/1000.0
+ tx_kbytes = (len(txhex) // 2) / 1000.0
self.fees_per_kb.append(float(fee)/tx_kbytes)
sync_mempools(self.nodes[0:3],.1)
mined = mining_node.getblock(mining_node.generate(1)[0],True)["tx"]