aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2017-03-06 18:05:44 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2017-03-06 18:06:00 +0100
commitc78adbf450be503157b0a89a53af6cb82bbaf829 (patch)
tree74ca63ab001cb6039c43afb38e3c0d32b91ac49e
parent4df8213b98d3216848114e70a90b67b6c390aa2d (diff)
parentb23dcd2bf98d7b4b672c3ea3782ca5c5b9c64d7b (diff)
Merge #9843: Fix segwit getblocktemplate test
b23dcd2 Fix segwit getblocktemplate test. (John Newbery) Tree-SHA512: db87a99432397bd9aa3b66580a92a69467aa4c8a9e3a191629429f80137a59f6ecb13d129d880ebe404d903e13b153aca3ca99e3b1a94e171a4b8a50fb690f3f
-rwxr-xr-xqa/rpc-tests/segwit.py15
1 files changed, 2 insertions, 13 deletions
diff --git a/qa/rpc-tests/segwit.py b/qa/rpc-tests/segwit.py
index f475427842..761c00dc01 100755
--- a/qa/rpc-tests/segwit.py
+++ b/qa/rpc-tests/segwit.py
@@ -248,20 +248,9 @@ class SegWitTest(BitcoinTestFramework):
assert(tmpl['transactions'][0]['txid'] == txid)
assert(tmpl['transactions'][0]['sigops'] == 8)
- print("Verify non-segwit miners get a valid GBT response after the fork")
+ print("Non-segwit miners are not able to use GBT response after activation.")
send_to_witness(1, self.nodes[0], find_unspent(self.nodes[0], 50), self.pubkey[0], False, Decimal("49.998"))
- try:
- tmpl = self.nodes[0].getblocktemplate({})
- assert(len(tmpl['transactions']) == 1) # Doesn't include witness tx
- assert(tmpl['sizelimit'] == 1000000)
- assert('weightlimit' not in tmpl)
- assert(tmpl['sigoplimit'] == 20000)
- assert(tmpl['transactions'][0]['hash'] == txid)
- assert(tmpl['transactions'][0]['sigops'] == 2)
- assert(('!segwit' in tmpl['rules']) or ('segwit' not in tmpl['rules']))
- except JSONRPCException:
- # This is an acceptable outcome
- pass
+ assert_raises_jsonrpc(-8, "Support for 'segwit' rule requires explicit client support", self.nodes[0].getblocktemplate, {})
print("Verify behaviour of importaddress, addwitnessaddress and listunspent")