Skip to content

Commit cd67397

Browse files
committed
Do a loop in keccak-lys
1 parent 8f52e48 commit cd67397

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

keccak-lys.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@ shard_pre_state:
66
- "0000000000000000000000000000000000000000000000000000000000000000"
77
shard_blocks:
88
- env: 0
9-
data: ""
10-
- env: 0
11-
data: ""
9+
data: "00000000000000000000000000000000000000000000000000000000000000ff"
1210
shard_post_state:
1311
exec_env_states:
14-
- "c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470"
12+
- "9f1c3493f670fb5a4611e82d5bbb06eb4969a406ecc1e47c0dca6f5ce354d187"

scripts/keccak-lys/main.lys

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,15 @@ fun main(): void = {
99
blockDataCopy(input.ptr, 0 as u32, len)
1010

1111
var k = Keccak()
12-
Keccak.update(k, input)
12+
var i = 0
13+
loop {
14+
if (i < 256) {
15+
i = i + 1
16+
Keccak.update(k, input)
17+
continue
18+
}
19+
break
20+
}
1321
var ret = Keccak.digest(k)
1422

1523
savePostStateRoot(ret.ptr)

0 commit comments

Comments
 (0)