diff options
author | Sebastian Falbesoner <sebastian.falbesoner@gmail.com> | 2021-09-28 13:37:46 +0200 |
---|---|---|
committer | Sebastian Falbesoner <sebastian.falbesoner@gmail.com> | 2021-09-29 14:09:14 +0200 |
commit | 429b49378ee3a3d73abe276cfd176c1ca08bf9b9 (patch) | |
tree | 0ae03630c70c2b4a11cb100a4128d53f527aa604 /test/functional/rpc_signrawtransaction.py | |
parent | d648bbb0a7909aed953b6f7907690134606a033a (diff) |
test: introduce script_util helper for creating P2PK scripts
Diffstat (limited to 'test/functional/rpc_signrawtransaction.py')
-rwxr-xr-x | test/functional/rpc_signrawtransaction.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/functional/rpc_signrawtransaction.py b/test/functional/rpc_signrawtransaction.py index 18abece253..c519d0c7d1 100755 --- a/test/functional/rpc_signrawtransaction.py +++ b/test/functional/rpc_signrawtransaction.py @@ -25,12 +25,12 @@ from test_framework.messages import ( from test_framework.script import ( CScript, OP_CHECKLOCKTIMEVERIFY, - OP_CHECKSIG, OP_CHECKSEQUENCEVERIFY, OP_DROP, OP_TRUE, ) from test_framework.script_util import ( + key_to_p2pk_script, key_to_p2pkh_script, script_to_p2sh_p2wsh_script, script_to_p2wsh_script, @@ -229,7 +229,7 @@ class SignRawTransactionsTest(BitcoinTestFramework): embedded_pubkey = eckey.get_pubkey().get_bytes().hex() witness_script = { 'P2PKH': key_to_p2pkh_script(embedded_pubkey).hex(), - 'P2PK': CScript([bytes.fromhex(embedded_pubkey), OP_CHECKSIG]).hex() + 'P2PK': key_to_p2pk_script(embedded_pubkey).hex() }.get(tx_type, "Invalid tx_type") redeem_script = script_to_p2wsh_script(witness_script).hex() addr = script_to_p2sh(redeem_script) |