Skip to content

Commit

Permalink
Update to chia-blockchain 1.8 (#93)
Browse files Browse the repository at this point in the history
  • Loading branch information
jack60612 committed May 13, 2023
1 parent e77e0ec commit b965ff0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
11 changes: 5 additions & 6 deletions cdv/cmds/chia_inspect.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,10 +311,9 @@ def do_inspect_coin_spend_cmd(
for coin_spend in coin_spend_objs:
program: BlockGenerator = simple_solution_generator(SpendBundle([coin_spend], G2Element()))
npc_result: NPCResult = get_name_puzzle_conditions(
# cost_per_byte=0 is meaningless and will be removed in the next chia-blockchain version
program,
INFINITE_COST,
cost_per_byte=0,
height=DEFAULT_CONSTANTS.SOFT_FORK2_HEIGHT, # so that all opcodes are available
mempool_mode=True,
)
cost: int = npc_result.cost
Expand Down Expand Up @@ -402,7 +401,7 @@ def do_inspect_spend_bundle_cmd(
npc_result: NPCResult = get_name_puzzle_conditions(
program,
INFINITE_COST,
cost_per_byte=0, # cost_per_byte=0 is meaningless and is removed in next chia-blockchain >1.7.1
height=DEFAULT_CONSTANTS.SOFT_FORK2_HEIGHT, # so that all opcodes are available
mempool_mode=True,
)
cost: int = npc_result.cost
Expand All @@ -427,11 +426,11 @@ def do_inspect_spend_bundle_cmd(
pkm_dict: Dict[str, List[bytes]] = {}
for obj in spend_bundle_objs:
for coin_spend in obj.coin_spends:
err, conditions_dict, _ = conditions_dict_for_solution(
conditions_dict = conditions_dict_for_solution(
coin_spend.puzzle_reveal, coin_spend.solution, INFINITE_COST
)
if err or conditions_dict is None:
print(f"Generating conditions failed, con:{conditions_dict}, error: {err}")
if conditions_dict is None:
print(f"Generating conditions failed, con:{conditions_dict}")
else:
config = load_config(DEFAULT_ROOT_PATH, "config.yaml")
genesis_challenge = config["network_overrides"]["constants"][kwargs["network"]][
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"pytest-asyncio",
"pytimeparse",
"anyio",
"chia-blockchain==1.7.1",
"chia-blockchain==1.8.0",
]

dev_dependencies = [
Expand Down

0 comments on commit b965ff0

Please sign in to comment.