Add test that transfer program remains default

This commit is contained in:
Matt Hauff 2022-06-13 07:32:04 -07:00
parent ccf16cb223
commit c8c46a605d
No known key found for this signature in database
GPG Key ID: 3CBA6CFC81A00E46

View File

@ -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,