[mining] segwit option must be set in GBT
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.
This commit is contained in:
1 parent
5f23460c7e
commit
0025c9eae4
10 files changed
+30
-62
No files matched your search
@@ -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)
|
||||
|
||||
|
||||
Reference in new issue
Block a user