Skip to content

Commit

Permalink
save
Browse files Browse the repository at this point in the history
  • Loading branch information
awskii committed Jan 20, 2025
1 parent c0b47ae commit 15257a0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions erigon-lib/commitment/hex_patricia_hashed.go
Original file line number Diff line number Diff line change
Expand Up @@ -2587,8 +2587,9 @@ type HexPatriciaHashedReader struct {
accValBuf rlp.RlpEncodedBytes
}

func NewHexPatriciaHashedReader(accountKeyLen int, ctx PatriciaContext, tmpdir string) *HexPatriciaHashed {
hph := &HexPatriciaHashed{
// returned reader has to be set to some state before use. Use .SetState() for that and `SeekCommitment` to get this state
func NewHexPatriciaHashedReader(accountKeyLen int, ctx PatriciaContext, tmpdir string) *HexPatriciaHashedReader {
hph := &HexPatriciaHashedReader{
ctx: ctx,
keccak: sha3.NewLegacyKeccak256().(keccakState),
keccak2: sha3.NewLegacyKeccak256().(keccakState),
Expand All @@ -2597,7 +2598,6 @@ func NewHexPatriciaHashedReader(accountKeyLen int, ctx PatriciaContext, tmpdir s
hadToLoadL: make(map[uint64]skipStat),
accValBuf: make(rlp.RlpEncodedBytes, 128),
}
hph.branchEncoder = NewBranchEncoder(1024, filepath.Join(tmpdir, "branch-encoder"))
return hph
}

Expand Down

0 comments on commit 15257a0

Please sign in to comment.