[qa] Switch to py3

Github-Pull: #7814
Rebased-From: fa389d4edc
This commit is contained in:
MarcoFalke
2016-03-19 20:58:06 +01:00
parent 1233cb42dd
commit 28265655da
69 changed files with 494 additions and 531 deletions

View File

@@ -1,8 +1,7 @@
#!/usr/bin/env python2
#
# Distributed under the MIT/X11 software license, see the accompanying
#!/usr/bin/env python3
# Copyright (c) 2015-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
from test_framework.test_framework import ComparisonTestFramework
from test_framework.util import *
@@ -38,7 +37,7 @@ class InvalidBlockRequestTest(ComparisonTestFramework):
def get_tests(self):
if self.tip is None:
self.tip = int ("0x" + self.nodes[0].getbestblockhash() + "L", 0)
self.tip = int("0x" + self.nodes[0].getbestblockhash(), 0)
self.block_time = int(time.time())+1
'''
@@ -58,7 +57,7 @@ class InvalidBlockRequestTest(ComparisonTestFramework):
Now we need that block to mature so we can spend the coinbase.
'''
test = TestInstance(sync_every_block=False)
for i in xrange(100):
for i in range(100):
block = create_block(self.tip, create_coinbase(height), self.block_time)
block.solve()
self.tip = block.sha256