diff --git a/test/functional/feature_asset_locks.py b/test/functional/feature_asset_locks.py index 7c3593cf20..af0c0e89ff 100755 --- a/test/functional/feature_asset_locks.py +++ b/test/functional/feature_asset_locks.py @@ -36,6 +36,7 @@ from test_framework.script import ( OP_RETURN, hash160, ) +from test_framework.script_util import key_to_p2pkh_script from test_framework.test_framework import DashTestFramework from test_framework.util import ( assert_equal, @@ -283,7 +284,11 @@ class AssetLocksTest(DashTestFramework): self.check_mempool_result(tx=asset_lock_tx, result_expected={'allowed': True, 'fees': {'base': Decimal(str(tiny_amount / COIN))}}) self.validate_credit_pool_balance(0) txid_in_block = self.send_tx(asset_lock_tx) - assert "assetLockTx" in node.getrawtransaction(txid_in_block, 1) + rpc_tx = node.getrawtransaction(txid_in_block, 1) + assert_equal(len(rpc_tx["assetLockTx"]["creditOutputs"]), 2) + assert_equal(rpc_tx["assetLockTx"]["creditOutputs"][0]["valueSat"] + rpc_tx["assetLockTx"]["creditOutputs"][1]["valueSat"], locked_1) + assert_equal(rpc_tx["assetLockTx"]["creditOutputs"][0]["scriptPubKey"]["hex"], key_to_p2pkh_script(pubkey).hex()) + assert_equal(rpc_tx["assetLockTx"]["creditOutputs"][1]["scriptPubKey"]["hex"], key_to_p2pkh_script(pubkey).hex()) self.validate_credit_pool_balance(0) node.generate(1) assert_equal(self.get_credit_pool_balance(node=node), locked_1)