aboutsummaryrefslogtreecommitdiff
path: root/test/functional/mempool_accept.py
diff options
context:
space:
mode:
authorSebastian Falbesoner <sebastian.falbesoner@gmail.com>2021-10-18 22:25:04 +0200
committerSebastian Falbesoner <sebastian.falbesoner@gmail.com>2021-10-26 14:51:18 +0200
commit4718897ce3a7c728ff7aebbadabcc8ed7a0b8d6e (patch)
tree94688adb3b3e52d5d0c202e960521d49ce680aff /test/functional/mempool_accept.py
parent22a90186496aea8025316bc5616905ffcf1aeb29 (diff)
downloadbitcoin-4718897ce3a7c728ff7aebbadabcc8ed7a0b8d6e.tar.xz
test: add script_util helper for creating bare multisig scripts
Diffstat (limited to 'test/functional/mempool_accept.py')
-rwxr-xr-xtest/functional/mempool_accept.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/test/functional/mempool_accept.py b/test/functional/mempool_accept.py
index 2ee440bcb7..71be2b4a82 100755
--- a/test/functional/mempool_accept.py
+++ b/test/functional/mempool_accept.py
@@ -22,13 +22,11 @@ from test_framework.messages import (
from test_framework.script import (
CScript,
OP_0,
- OP_2,
- OP_3,
- OP_CHECKMULTISIG,
OP_HASH160,
OP_RETURN,
)
from test_framework.script_util import (
+ keys_to_multisig_script,
script_to_p2sh_script,
)
from test_framework.util import (
@@ -283,7 +281,7 @@ class MempoolAcceptanceTest(BitcoinTestFramework):
key = ECKey()
key.generate()
pubkey = key.get_pubkey().get_bytes()
- tx.vout[0].scriptPubKey = CScript([OP_2, pubkey, pubkey, pubkey, OP_3, OP_CHECKMULTISIG]) # Some bare multisig script (2-of-3)
+ tx.vout[0].scriptPubKey = keys_to_multisig_script([pubkey] * 3, k=2) # Some bare multisig script (2-of-3)
self.check_mempool_result(
result_expected=[{'txid': tx.rehash(), 'allowed': False, 'reject-reason': 'bare-multisig'}],
rawtxs=[tx.serialize().hex()],