mirror of
https://github.com/Chia-Network/chia-blockchain.git
synced 2024-09-21 00:24:37 +03:00
Add test that transfer program remains default
This commit is contained in:
parent
ccf16cb223
commit
c8c46a605d
@ -140,7 +140,7 @@ async def test_ownership_layer(setup_sim: Tuple[SpendSim, SimClient]) -> None:
|
||||
|
||||
try:
|
||||
TARGET_OWNER = bytes32([0] * 32)
|
||||
TARGET_TP = Program.to([])
|
||||
TARGET_TP = Program.to([8]) # (x)
|
||||
# (c 19 (c 43 (c 5 ()))) or (mod (_ _ (new_owner new_tp)) (list new_owner new_tp ()))
|
||||
transfer_program = Program.to([4, 19, [4, 43, [4, [], []]]])
|
||||
|
||||
@ -155,6 +155,19 @@ async def test_ownership_layer(setup_sim: Tuple[SpendSim, SimClient]) -> None:
|
||||
0
|
||||
].coin
|
||||
|
||||
generic_spend = CoinSpend(
|
||||
ownership_coin,
|
||||
ownership_puzzle,
|
||||
Program.to([[[51, ACS_PH, 1], [-10, [], []]]]),
|
||||
)
|
||||
generic_bundle = SpendBundle([generic_spend], G2Element())
|
||||
result = await sim_client.push_tx(generic_bundle)
|
||||
assert result == (MempoolInclusionStatus.SUCCESS, None)
|
||||
await sim.farm_block()
|
||||
ownership_coin = (await sim_client.get_coin_records_by_puzzle_hash(ownership_ph, include_spent_coins=False))[
|
||||
0
|
||||
].coin
|
||||
|
||||
skip_tp_spend = CoinSpend(
|
||||
ownership_coin,
|
||||
ownership_puzzle,
|
||||
|
Loading…
Reference in New Issue
Block a user