Revert "don't build a dict of the conditions, just to iterate over them (#6607)"

This reverts commit 7cdc93efac.
This commit is contained in:
Richard Kiss
2021-06-08 15:22:25 -07:00
parent 9239ee5c9e
commit 8d13e8d5d2
+1 -1
View File
@@ -27,7 +27,7 @@ def calculate_cost_of_program(program: SerializedProgram, npc_result: NPCResult,
# Add cost of conditions
npc: NPC
for npc in npc_list:
for condition, cvp_list in npc.conditions:
for condition, cvp_list in npc.condition_dict.items():
if condition is ConditionOpcode.AGG_SIG_UNSAFE or condition is ConditionOpcode.AGG_SIG_ME:
total_cost += len(cvp_list) * ConditionCost.AGG_SIG.value
elif condition is ConditionOpcode.CREATE_COIN: