Skip to content

Commit

Permalink
Revert "don't build a dict of the conditions, just to iterate over th…
Browse files Browse the repository at this point in the history
…em (Chia-Network#6607)"

This reverts commit 7cdc93e.
  • Loading branch information
richardkiss committed Jun 8, 2021
1 parent 9239ee5 commit 8d13e8d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion chia/consensus/cost_calculator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 8d13e8d

Please sign in to comment.