Skip to content

Commit b619f12

Browse files
fix: solicit call (#319)
2 parents 1e2b70c + e0bb53f commit b619f12

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

jam/execution/invocations/functions/accumulate_fns.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -435,12 +435,13 @@ def solicit(
435435
):
436436
preimage_hash_addr, preimage_len = registers[7], registers[8]
437437

438+
if not memory.is_accessible(preimage_hash_addr, 32):
439+
raise PvmError(PANIC)
440+
438441
if preimage_len >= 2**32:
439442
registers[7] = HostStatus.FULL.value
440443
return ExecutionStatus.CONTINUE, gas, registers, memory, context
441444

442-
if not memory.is_accessible(preimage_hash_addr, 32):
443-
raise PvmError(PANIC)
444445
preimage_hash = Bytes[32](memory.read(preimage_hash_addr, 32))
445446

446447
# from jam.state.state import state

jam/fuzzer/target.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def run_fuzzer_target_loop(sock: socket.socket, db_path: str, record_path: Optio
7373
block_count = 0
7474

7575
# Initialize state
76-
from jam.state.state import state as _state
76+
from jam.state.state import state as _state, State
7777
state = _state
7878

7979
while True:
@@ -98,7 +98,7 @@ def run_fuzzer_target_loop(sock: socket.socket, db_path: str, record_path: Optio
9898
json_data["blocks"].append(block.to_json())
9999
valid_block = state._force_transition(block, True, True)
100100
if valid_block:
101-
post_state = state.load(block.header.hash())
101+
post_state = State.load(block.header.hash())
102102
send_message(conn, TAG_STATE_ROOT, post_state.root)
103103

104104
record_index += 1

0 commit comments

Comments
 (0)