aboutsummaryrefslogtreecommitdiff
path: root/qa/rpc-tests/bipdersig-p2p.py
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2016-03-19 20:58:06 +0100
committerMarcoFalke <falke.marco@gmail.com>2016-07-15 19:31:08 +0200
commit28265655da658bf8351f038f7c51a48d8c80f7c0 (patch)
tree837d3b592f59cedd7f5f40e77935a0891423239e /qa/rpc-tests/bipdersig-p2p.py
parent1233cb42dde9504c4ca3586f872af4f6f0e8e0ed (diff)
downloadbitcoin-28265655da658bf8351f038f7c51a48d8c80f7c0.tar.xz
[qa] Switch to py3
Github-Pull: #7814 Rebased-From: fa389d4edc367073e2ccc6d1f0790c4b72ba17f2
Diffstat (limited to 'qa/rpc-tests/bipdersig-p2p.py')
-rwxr-xr-xqa/rpc-tests/bipdersig-p2p.py15
1 files changed, 7 insertions, 8 deletions
diff --git a/qa/rpc-tests/bipdersig-p2p.py b/qa/rpc-tests/bipdersig-p2p.py
index b1db5ba4af..c462730840 100755
--- a/qa/rpc-tests/bipdersig-p2p.py
+++ b/qa/rpc-tests/bipdersig-p2p.py
@@ -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 *
@@ -75,13 +74,13 @@ class BIP66Test(ComparisonTestFramework):
self.coinbase_blocks = self.nodes[0].generate(2)
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())
''' 98 more version 2 blocks '''
test_blocks = []
- for i in xrange(98):
+ for i in range(98):
block = create_block(self.tip, create_coinbase(height), self.last_block_time + 1)
block.nVersion = 2
block.rehash()
@@ -94,7 +93,7 @@ class BIP66Test(ComparisonTestFramework):
''' Mine 749 version 3 blocks '''
test_blocks = []
- for i in xrange(749):
+ for i in range(749):
block = create_block(self.tip, create_coinbase(height), self.last_block_time + 1)
block.nVersion = 3
block.rehash()
@@ -146,7 +145,7 @@ class BIP66Test(ComparisonTestFramework):
''' Mine 199 new version blocks on last valid tip '''
test_blocks = []
- for i in xrange(199):
+ for i in range(199):
block = create_block(self.tip, create_coinbase(height), self.last_block_time + 1)
block.nVersion = 3
block.rehash()