Skip to content

Commit e0bb53f

Browse files
authored
Merge pull request #318 from Chainscore/fix/m1
Fix/m1
2 parents d7d6e77 + 4103160 commit e0bb53f

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

jam/cli.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,8 @@ def main():
192192
args.theme,
193193
False,
194194
True,
195-
args.no_rpc
195+
args.no_rpc,
196+
None
196197
)
197198
)
198199
except KeyboardInterrupt:

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)