Skip to content

Commit b23dcd2

Browse files
committed
Fix segwit getblocktemplate test.
1 parent 692c9ed commit b23dcd2

File tree

1 file changed

+2
-13
lines changed

1 file changed

+2
-13
lines changed

qa/rpc-tests/segwit.py

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -248,20 +248,9 @@ def run_test(self):
248248
assert(tmpl['transactions'][0]['txid'] == txid)
249249
assert(tmpl['transactions'][0]['sigops'] == 8)
250250

251-
print("Verify non-segwit miners get a valid GBT response after the fork")
251+
print("Non-segwit miners are not able to use GBT response after activation.")
252252
send_to_witness(1, self.nodes[0], find_unspent(self.nodes[0], 50), self.pubkey[0], False, Decimal("49.998"))
253-
try:
254-
tmpl = self.nodes[0].getblocktemplate({})
255-
assert(len(tmpl['transactions']) == 1) # Doesn't include witness tx
256-
assert(tmpl['sizelimit'] == 1000000)
257-
assert('weightlimit' not in tmpl)
258-
assert(tmpl['sigoplimit'] == 20000)
259-
assert(tmpl['transactions'][0]['hash'] == txid)
260-
assert(tmpl['transactions'][0]['sigops'] == 2)
261-
assert(('!segwit' in tmpl['rules']) or ('segwit' not in tmpl['rules']))
262-
except JSONRPCException:
263-
# This is an acceptable outcome
264-
pass
253+
assert_raises_jsonrpc(-8, "Support for 'segwit' rule requires explicit client support", self.nodes[0].getblocktemplate, {})
265254

266255
print("Verify behaviour of importaddress, addwitnessaddress and listunspent")
267256

0 commit comments

Comments
 (0)