aboutsummaryrefslogtreecommitdiff
path: root/qa
diff options
context:
space:
mode:
authorJohn Newbery <john@johnnewbery.com>2017-02-09 18:59:51 -0500
committerJohn Newbery <john@johnnewbery.com>2017-02-23 18:01:37 -0500
commitb23dcd2bf98d7b4b672c3ea3782ca5c5b9c64d7b (patch)
treec35d70fc3b18aefa1d4332ba0b592fb52d659d77 /qa
parent692c9eddba67d5a7ceb85fa4b2632f664c68f418 (diff)
downloadbitcoin-b23dcd2bf98d7b4b672c3ea3782ca5c5b9c64d7b.tar.xz
Fix segwit getblocktemplate test.
Diffstat (limited to 'qa')
-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")