diff options
author | MarcoFalke <falke.marco@gmail.com> | 2016-03-19 20:58:06 +0100 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2016-05-05 15:43:37 +0200 |
commit | fa389d4edc367073e2ccc6d1f0790c4b72ba17f2 (patch) | |
tree | 3bc22860769bb62b3679dbd185940cf3df9f890e /qa/rpc-tests/bip9-softforks.py | |
parent | 3b9a0bf41f2336b09e854522ab1ce6dcfc7a3050 (diff) |
[qa] Switch to py3
Diffstat (limited to 'qa/rpc-tests/bip9-softforks.py')
-rwxr-xr-x | qa/rpc-tests/bip9-softforks.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/qa/rpc-tests/bip9-softforks.py b/qa/rpc-tests/bip9-softforks.py index ddca3c2e33..e9b659d508 100755 --- a/qa/rpc-tests/bip9-softforks.py +++ b/qa/rpc-tests/bip9-softforks.py @@ -1,8 +1,7 @@ -#!/usr/bin/env python2 +#!/usr/bin/env python3 # Copyright (c) 2015 The Bitcoin Core developers -# Distributed under the MIT/X11 software license, see the accompanying +# 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 * @@ -64,7 +63,7 @@ class BIP9SoftForksTest(ComparisonTestFramework): return tx def generate_blocks(self, number, version, test_blocks = []): - for i in xrange(number): + for i in range(number): block = create_block(self.tip, create_coinbase(self.height), self.last_block_time + 1) block.nVersion = version block.rehash() @@ -83,7 +82,7 @@ class BIP9SoftForksTest(ComparisonTestFramework): # generate some coins for later self.coinbase_blocks = self.nodes[0].generate(2) self.height = 3 # height of the next block to build - self.tip = int ("0x" + self.nodes[0].getbestblockhash() + "L", 0) + self.tip = int("0x" + self.nodes[0].getbestblockhash(), 0) self.nodeaddress = self.nodes[0].getnewaddress() self.last_block_time = int(time.time()) |