Skip to content

Commit

Permalink
refactor: use key_to_p2pkh_script in more places
Browse files Browse the repository at this point in the history
  • Loading branch information
UdjinM6 committed Aug 23, 2024
1 parent 3ed6246 commit e54fe42
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions test/functional/feature_asset_locks.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,7 @@
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
Expand Down Expand Up @@ -67,8 +63,8 @@ def create_assetlock(self, coin, amount, pubkey):
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)

Expand Down

0 comments on commit e54fe42

Please sign in to comment.