Skip to content

Commit 162ead5

Browse files
Add hashstorage
1 parent 68ea308 commit 162ead5

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

p2p/hashstorage/hash_storage.go

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
package hashstorage
2+
3+
import (
4+
_ "embed"
5+
6+
"github.com/NethermindEth/juno/core/felt"
7+
)
8+
9+
const first0132SepoliaBlock = 86311
10+
11+
//go:embed sepolia_block_hashes.bin
12+
var sepoliaBlockHashes []byte
13+
14+
var SepoliaBlockHashesMap = make(map[uint64]*felt.Felt, first0132SepoliaBlock)
15+
16+
//nolint:gochecknoinits
17+
func init() {
18+
var offset uint64
19+
for i := uint64(0); i < first0132SepoliaBlock; i++ {
20+
offset = i * 32
21+
SepoliaBlockHashesMap[i] = new(felt.Felt).SetBytes(sepoliaBlockHashes[offset : offset+32])
22+
}
23+
}
2.63 MB
Binary file not shown.

0 commit comments

Comments
 (0)