Skip to content

Commit

Permalink
use bitarray
Browse files Browse the repository at this point in the history
  • Loading branch information
weiihann committed Jan 23, 2025
1 parent 0c75f0b commit f5f1bcc
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions rpc/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -280,10 +280,9 @@ type EdgeNode struct {
func (e *EdgeNode) AsProofNode() trie.ProofNode {
f, _ := new(felt.Felt).SetString(e.Path)
pbs := f.Bytes()
path := trie.NewKey(uint8(e.Length), pbs[:])

return &trie.Edge{
Path: &path,
Path: new(trie.BitArray).SetBytes(uint8(e.Length), pbs[:]),
Child: e.Child,
}
}
Expand Down

0 comments on commit f5f1bcc

Please sign in to comment.