aboutsummaryrefslogtreecommitdiff
path: root/qa/rpc-tests/pruning.py
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2016-03-20 18:18:32 +0100
committerMarcoFalke <falke.marco@gmail.com>2016-04-01 21:23:30 +0200
commitfa2cea163b49a97e2a18aa125e41170d60ce59cc (patch)
tree02d1c4fc64dfb2d72e2efb12a4b63392085a9036 /qa/rpc-tests/pruning.py
parentfa524d9ddbad0a03f9eb974100fb3b6001045645 (diff)
[qa] rpc-tests: Properly use integers, floats
Diffstat (limited to 'qa/rpc-tests/pruning.py')
-rwxr-xr-xqa/rpc-tests/pruning.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/qa/rpc-tests/pruning.py b/qa/rpc-tests/pruning.py
index b0f4b88aee..dd2adea950 100755
--- a/qa/rpc-tests/pruning.py
+++ b/qa/rpc-tests/pruning.py
@@ -15,7 +15,7 @@ from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import *
def calc_usage(blockdir):
- return sum(os.path.getsize(blockdir+f) for f in os.listdir(blockdir) if os.path.isfile(blockdir+f))/(1024*1024)
+ return sum(os.path.getsize(blockdir+f) for f in os.listdir(blockdir) if os.path.isfile(blockdir+f)) / (1024. * 1024.)
class PruneTest(BitcoinTestFramework):
@@ -56,7 +56,7 @@ class PruneTest(BitcoinTestFramework):
self.nodes[1].generate(200)
sync_blocks(self.nodes[0:2])
self.nodes[0].generate(150)
- # Then mine enough full blocks to create more than 550MB of data
+ # Then mine enough full blocks to create more than 550MiB of data
for i in xrange(645):
self.mine_full_block(self.nodes[0], self.address[0])
@@ -66,7 +66,7 @@ class PruneTest(BitcoinTestFramework):
if not os.path.isfile(self.prunedir+"blk00000.dat"):
raise AssertionError("blk00000.dat is missing, pruning too early")
print "Success"
- print "Though we're already using more than 550MB, current usage:", calc_usage(self.prunedir)
+ print "Though we're already using more than 550MiB, current usage:", calc_usage(self.prunedir)
print "Mining 25 more blocks should cause the first block file to be pruned"
# Pruning doesn't run until we're allocating another chunk, 20 full blocks past the height cutoff will ensure this
for i in xrange(25):