From a7736f8749ae6002ee248cf6f86b29641fe4c777 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jorge=20Tim=C3=B3n?= Date: Wed, 26 Sep 2018 02:44:19 +0200 Subject: [PATCH] QA: Add test to get 'Given claim_script is not hex' error --- qa/rpc-tests/feature_fedpeg.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/qa/rpc-tests/feature_fedpeg.py b/qa/rpc-tests/feature_fedpeg.py index d9631cd2a5..6b627a1dfc 100755 --- a/qa/rpc-tests/feature_fedpeg.py +++ b/qa/rpc-tests/feature_fedpeg.py @@ -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"]