Skip to content

Commit 37c77b3

Browse files
authored
update create_coin hint test to use a list (#8628)
* update create_coin hint test to use a list * the hint/memo is always included in the CREATE_COIN conditions now
1 parent 2a95b54 commit 37c77b3

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

tests/core/full_node/test_mempool.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1818,7 +1818,7 @@ def test_create_coin_different_parent(self):
18181818
assert c.conditions == [
18191819
(
18201820
opcode.value,
1821-
[ConditionWithArgs(opcode, [puzzle_hash.encode("ascii"), bytes([10])])],
1821+
[ConditionWithArgs(opcode, [puzzle_hash.encode("ascii"), bytes([10]), b""])],
18221822
)
18231823
]
18241824

@@ -1832,11 +1832,11 @@ def test_create_coin_different_puzzhash(self):
18321832
assert len(npc_result.npc_list) == 1
18331833
opcode = ConditionOpcode.CREATE_COIN
18341834
assert (
1835-
ConditionWithArgs(opcode, [puzzle_hash_1.encode("ascii"), bytes([5])])
1835+
ConditionWithArgs(opcode, [puzzle_hash_1.encode("ascii"), bytes([5]), b""])
18361836
in npc_result.npc_list[0].conditions[0][1]
18371837
)
18381838
assert (
1839-
ConditionWithArgs(opcode, [puzzle_hash_2.encode("ascii"), bytes([5])])
1839+
ConditionWithArgs(opcode, [puzzle_hash_2.encode("ascii"), bytes([5]), b""])
18401840
in npc_result.npc_list[0].conditions[0][1]
18411841
)
18421842

@@ -1849,19 +1849,19 @@ def test_create_coin_different_amounts(self):
18491849
assert len(npc_result.npc_list) == 1
18501850
opcode = ConditionOpcode.CREATE_COIN
18511851
assert (
1852-
ConditionWithArgs(opcode, [puzzle_hash.encode("ascii"), bytes([5])])
1852+
ConditionWithArgs(opcode, [puzzle_hash.encode("ascii"), bytes([5]), b""])
18531853
in npc_result.npc_list[0].conditions[0][1]
18541854
)
18551855
assert (
1856-
ConditionWithArgs(opcode, [puzzle_hash.encode("ascii"), bytes([4])])
1856+
ConditionWithArgs(opcode, [puzzle_hash.encode("ascii"), bytes([4]), b""])
18571857
in npc_result.npc_list[0].conditions[0][1]
18581858
)
18591859

18601860
def test_create_coin_with_hint(self):
18611861
# CREATE_COIN
18621862
puzzle_hash_1 = "abababababababababababababababab"
18631863
hint = "12341234123412341234213421341234"
1864-
npc_result = generator_condition_tester(f'(51 "{puzzle_hash_1}" 5 "{hint}")')
1864+
npc_result = generator_condition_tester(f'(51 "{puzzle_hash_1}" 5 ("{hint}"))')
18651865
assert npc_result.error is None
18661866
assert len(npc_result.npc_list) == 1
18671867
opcode = ConditionOpcode.CREATE_COIN

tests/generator/test_rom.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ def test_get_name_puzzle_conditions(self):
103103
npc_result = get_name_puzzle_conditions(gen, max_cost=MAX_COST, cost_per_byte=COST_PER_BYTE, safe_mode=False)
104104
assert npc_result.error is None
105105
assert npc_result.clvm_cost == EXPECTED_COST
106-
cond_1 = ConditionWithArgs(ConditionOpcode.CREATE_COIN, [bytes([0] * 31 + [1]), int_to_bytes(500)])
106+
cond_1 = ConditionWithArgs(ConditionOpcode.CREATE_COIN, [bytes([0] * 31 + [1]), int_to_bytes(500), b""])
107107
CONDITIONS = [
108108
(ConditionOpcode.CREATE_COIN, [cond_1]),
109109
]

0 commit comments

Comments
 (0)