From e54fe42ce85b0ace8291699f3ecce2e52e638d27 Mon Sep 17 00:00:00 2001 From: UdjinM6 Date: Sat, 24 Aug 2024 00:51:21 +0300 Subject: [PATCH] refactor: use `key_to_p2pkh_script` in more places --- test/functional/feature_asset_locks.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/test/functional/feature_asset_locks.py b/test/functional/feature_asset_locks.py index af0c0e89ff..a4d9761522 100755 --- a/test/functional/feature_asset_locks.py +++ b/test/functional/feature_asset_locks.py @@ -30,11 +30,7 @@ from test_framework.messages import ( from test_framework.script import ( CScript, OP_CHECKSIG, - OP_DUP, - OP_EQUALVERIFY, - OP_HASH160, OP_RETURN, - hash160, ) from test_framework.script_util import key_to_p2pkh_script from test_framework.test_framework import DashTestFramework @@ -67,8 +63,8 @@ class AssetLocksTest(DashTestFramework): tmp_amount = amount if tmp_amount > COIN: tmp_amount -= COIN - credit_outputs.append(CTxOut(COIN, CScript([OP_DUP, OP_HASH160, hash160(pubkey), OP_EQUALVERIFY, OP_CHECKSIG]))) - credit_outputs.append(CTxOut(tmp_amount, CScript([OP_DUP, OP_HASH160, hash160(pubkey), OP_EQUALVERIFY, OP_CHECKSIG]))) + credit_outputs.append(CTxOut(COIN, key_to_p2pkh_script(pubkey))) + credit_outputs.append(CTxOut(tmp_amount, key_to_p2pkh_script(pubkey))) lockTx_payload = CAssetLockTx(1, credit_outputs)