aboutsummaryrefslogtreecommitdiff
path: root/qa/rpc-tests/smartfees.py
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2016-03-19 21:36:32 +0100
committerMarcoFalke <falke.marco@gmail.com>2016-04-05 11:55:07 +0200
commitff9b4361632cc93f8ab4b5640ed146b1a2037825 (patch)
treed0fe52b2b8c18b3f6d70c4950459722d901357b0 /qa/rpc-tests/smartfees.py
parentb1dd64bffe6ead5028d3eac510b21b86f642cbba (diff)
downloadbitcoin-ff9b4361632cc93f8ab4b5640ed146b1a2037825.tar.xz
[qa] Bug fixes and refactor
Github-Pull: #7778 Rebased-From: fa524d9ddbad0a03f9eb974100fb3b6001045645 fa2cea163b49a97e2a18aa125e41170d60ce59cc faaa3c9b6546d9a64cece4ff0223f0b167feb6ff 444480649f08e6037f8ac178224b30a82e9ad72e
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"]