aboutsummaryrefslogtreecommitdiff
path: root/test/functional/feature_segwit.py
diff options
context:
space:
mode:
authorSebastian Falbesoner <sebastian.falbesoner@gmail.com>2021-09-28 13:37:46 +0200
committerSebastian Falbesoner <sebastian.falbesoner@gmail.com>2021-09-29 14:09:14 +0200
commit429b49378ee3a3d73abe276cfd176c1ca08bf9b9 (patch)
tree0ae03630c70c2b4a11cb100a4128d53f527aa604 /test/functional/feature_segwit.py
parentd648bbb0a7909aed953b6f7907690134606a033a (diff)
downloadbitcoin-429b49378ee3a3d73abe276cfd176c1ca08bf9b9.tar.xz
test: introduce script_util helper for creating P2PK scripts
Diffstat (limited to 'test/functional/feature_segwit.py')
-rwxr-xr-xtest/functional/feature_segwit.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/functional/feature_segwit.py b/test/functional/feature_segwit.py
index 25d1cb2bf1..2f9ab34e99 100755
--- a/test/functional/feature_segwit.py
+++ b/test/functional/feature_segwit.py
@@ -31,11 +31,11 @@ from test_framework.script import (
OP_1,
OP_2,
OP_CHECKMULTISIG,
- OP_CHECKSIG,
OP_DROP,
OP_TRUE,
)
from test_framework.script_util import (
+ key_to_p2pk_script,
key_to_p2pkh_script,
key_to_p2wpkh_script,
script_to_p2sh_script,
@@ -459,7 +459,7 @@ class SegWitTest(BitcoinTestFramework):
importlist.append(script_to_p2wsh_script(bare).hex())
else:
pubkey = bytes.fromhex(v['pubkey'])
- p2pk = CScript([pubkey, OP_CHECKSIG])
+ p2pk = key_to_p2pk_script(pubkey)
p2pkh = key_to_p2pkh_script(pubkey)
importlist.append(p2pk.hex())
importlist.append(p2pkh.hex())
@@ -628,7 +628,7 @@ class SegWitTest(BitcoinTestFramework):
pubkey = bytes.fromhex(v['pubkey'])
p2wpkh = key_to_p2wpkh_script(pubkey)
p2sh_p2wpkh = script_to_p2sh_script(p2wpkh)
- p2pk = CScript([pubkey, OP_CHECKSIG])
+ p2pk = key_to_p2pk_script(pubkey)
p2pkh = CScript(bytes.fromhex(v['scriptPubKey']))
p2sh_p2pk = script_to_p2sh_script(p2pk)
p2sh_p2pkh = script_to_p2sh_script(p2pkh)