diff options
author | MarcoFalke <falke.marco@gmail.com> | 2018-12-21 13:45:55 +0100 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2018-12-21 13:46:06 +0100 |
commit | feda41e0a7c4440d398516850f9cbd4c4f3192dd (patch) | |
tree | ac75b0e19dea6398f1a6065bafcea354e05f043d /test/functional/mining_prioritisetransaction.py | |
parent | 45fe39022a65b615fcb6baa1933ed52f5d0caa58 (diff) | |
parent | d2ce315fbfd8d8ed52bde9f714ded8c76521cce2 (diff) |
Merge #14811: Mining: Enforce that segwit option must be set in GBT
d2ce315fbf [docs] add release note for change to GBT (John Newbery)
0025c9eae4 [mining] segwit option must be set in GBT (John Newbery)
Pull request description:
Calling getblocktemplate without the segwit rule specified is most
likely a client error, since it results in lower fees for the miner.
Prevent this client error by failing getblocktemplate if called without
the segwit rule specified.
Of the previous 1000 blocks (measured at block [551591 (hash 0x...173c811)](https://blockstream.info/block/000000000000000000173c811e79858808abc3216af607035973f002bef60a7a)), 991 included segwit transactions.
Tree-SHA512: 7933b073d72683c9ab9318db46a085ec19a56a14937945c73f783ac7656887619a86b74db0bdfcb8121df44f63a1d6a6fb19e98505b2a26a6a8a6e768e442fee
Diffstat (limited to 'test/functional/mining_prioritisetransaction.py')
-rwxr-xr-x | test/functional/mining_prioritisetransaction.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/functional/mining_prioritisetransaction.py b/test/functional/mining_prioritisetransaction.py index da16bfbbfb..ca4b621a78 100755 --- a/test/functional/mining_prioritisetransaction.py +++ b/test/functional/mining_prioritisetransaction.py @@ -142,10 +142,10 @@ class PrioritiseTransactionTest(BitcoinTestFramework): # getblocktemplate to (eventually) return a new block. mock_time = int(time.time()) self.nodes[0].setmocktime(mock_time) - template = self.nodes[0].getblocktemplate() + template = self.nodes[0].getblocktemplate({'rules': ['segwit']}) self.nodes[0].prioritisetransaction(txid=tx_id, fee_delta=-int(self.relayfee*COIN)) self.nodes[0].setmocktime(mock_time+10) - new_template = self.nodes[0].getblocktemplate() + new_template = self.nodes[0].getblocktemplate({'rules': ['segwit']}) assert(template != new_template) |