mirror of
https://github.com/dashpay/dash.git
synced 2024-12-24 19:42:46 +01:00
test: check creditOutputs
format
This commit is contained in:
parent
ba0e64505b
commit
3ed6246889
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user