From 66c570a38eb21153599f0478adc5a17ca9821a52 Mon Sep 17 00:00:00 2001 From: John Newbery Date: Tue, 11 Apr 2017 15:09:19 -0400 Subject: [PATCH] [tests] Don't build the coinbase manually in getblocktemplate test --- test/functional/getblocktemplate_proposals.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/test/functional/getblocktemplate_proposals.py b/test/functional/getblocktemplate_proposals.py index 6fd5279b8..82a82d01f 100755 --- a/test/functional/getblocktemplate_proposals.py +++ b/test/functional/getblocktemplate_proposals.py @@ -8,6 +8,7 @@ from binascii import a2b_hex, b2a_hex from hashlib import sha256 from struct import pack +from test_framework.blocktools import create_coinbase from test_framework.test_framework import BitcoinTestFramework from test_framework.util import * @@ -78,13 +79,13 @@ class GetBlockTemplateProposalTest(BitcoinTestFramework): # Mine a block to leave initial block download node.generate(1) tmpl = node.getblocktemplate() - if 'coinbasetxn' not in tmpl: - rawcoinbase = encodeUNum(tmpl['height']) - rawcoinbase += b'\x01-' - hexcoinbase = b2x(rawcoinbase) - hexoutval = b2x(pack('