From b81d8b8e6e1914b0e30372991b0955fdfeb5c243 Mon Sep 17 00:00:00 2001 From: duelingbenjos Date: Fri, 18 Oct 2024 18:21:49 +0100 Subject: [PATCH] use the provided methods from utils --- src/xian/tools/export_state.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/xian/tools/export_state.py b/src/xian/tools/export_state.py index b74eb32..f46fbac 100644 --- a/src/xian/tools/export_state.py +++ b/src/xian/tools/export_state.py @@ -6,7 +6,7 @@ from contracting.storage.driver import Driver from contracting.storage.encoder import encode from xian_py.wallet import Wallet -from xian.utils.block import is_compiled_key +from xian.utils.block import is_compiled_key, get_latest_block_height, get_latest_block_hash def hash_genesis_block_state_changes(state_changes: list) -> str: @@ -36,12 +36,13 @@ def fetch_filebased_state(): driver = Driver() contract_state = driver.get_all_contract_state() run_state = driver.get_run_state() + print('run_state', run_state) return contract_state, run_state def build_genesis_block(founder_sk: str, contract_state: dict, run_state: dict): - hash = run_state["__latest_block.hash"].hex() - block_number = run_state["__latest_block.height"] + hash = get_latest_block_hash() + block_number = get_latest_block_height() genesis_block = { 'hash': hash,