QA: Add test to get 'Given claim_script is not hex' error

This commit is contained in:
Jorge Timón 2018-09-26 02:44:19 +02:00
parent 35364b6746
commit a7736f8749
No known key found for this signature in database
GPG key ID: A4F5D141C01A0387

View file

@ -179,6 +179,13 @@ class FedPegTest(BitcoinTestFramework):
print('RPC ERROR:', e.error['message'])
assert("Peg-in Bitcoin transaction needs more confirmations to be sent." in e.error["message"])
try:
pegtxid = sidechain.createrawpegin(raw, proof, 'AEIOU')
raise Exception("Peg-in with non-hex claim_script should fail.")
except JSONRPCException as e:
print('RPC ERROR:', e.error['message'])
assert("Given claim_script is not hex." in e.error["message"])
# Should fail due to non-matching wallet address
try:
scriptpubkey = sidechain.validateaddress(get_new_unconfidential_address(sidechain))["scriptPubKey"]