Skip to content

Commit

Permalink
allow fetching poseidon hash in zktrie mode
Browse files Browse the repository at this point in the history
  • Loading branch information
omerfirmak committed Jan 8, 2025
1 parent 3fcfbe3 commit 1ff0d01
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion core/state/state_object.go
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,10 @@ func (s *stateObject) setNonce(nonce uint64) {
}

func (s *stateObject) PoseidonCodeHash() []byte {
panic("shouldn't be called")
if !s.db.IsZktrie() {
panic("PoseidonCodeHash is only available in zktrie mode")
}
return s.data.PoseidonCodeHash
}

func (s *stateObject) KeccakCodeHash() []byte {
Expand Down

0 comments on commit 1ff0d01

Please sign in to comment.