diff options
author | Sebastian Falbesoner <sebastian.falbesoner@gmail.com> | 2021-06-27 23:52:38 +0200 |
---|---|---|
committer | Sebastian Falbesoner <sebastian.falbesoner@gmail.com> | 2021-07-05 20:40:47 +0200 |
commit | 285a65ccfde2e811cfe01e916b998c02ee534a97 (patch) | |
tree | 969a94f117d2a7ef637d2a06b4ef97c940d9b544 /test/functional/mempool_accept.py | |
parent | b57b633b942da162045b1fe7743a8abdfeaf60e2 (diff) | |
download | bitcoin-285a65ccfde2e811cfe01e916b998c02ee534a97.tar.xz |
test: use script_util helpers for creating P2SH scripts
Diffstat (limited to 'test/functional/mempool_accept.py')
-rwxr-xr-x | test/functional/mempool_accept.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/test/functional/mempool_accept.py b/test/functional/mempool_accept.py index 1705d957aa..43e6a157a4 100755 --- a/test/functional/mempool_accept.py +++ b/test/functional/mempool_accept.py @@ -19,16 +19,17 @@ from test_framework.messages import ( tx_from_hex, ) from test_framework.script import ( - hash160, CScript, OP_0, OP_2, OP_3, OP_CHECKMULTISIG, - OP_EQUAL, OP_HASH160, OP_RETURN, ) +from test_framework.script_util import ( + script_to_p2sh_script, +) from test_framework.util import ( assert_equal, assert_raises_rpc_error, @@ -291,7 +292,7 @@ class MempoolAcceptanceTest(BitcoinTestFramework): rawtxs=[tx.serialize().hex()], ) tx = tx_from_hex(raw_tx_reference) - output_p2sh_burn = CTxOut(nValue=540, scriptPubKey=CScript([OP_HASH160, hash160(b'burn'), OP_EQUAL])) + output_p2sh_burn = CTxOut(nValue=540, scriptPubKey=script_to_p2sh_script(b'burn')) num_scripts = 100000 // len(output_p2sh_burn.serialize()) # Use enough outputs to make the tx too large for our policy tx.vout = [output_p2sh_burn] * num_scripts self.check_mempool_result( |