Skip to content

Commit

Permalink
Update zk_trie_database.go
Browse files Browse the repository at this point in the history
  • Loading branch information
0xmountaintop authored Feb 1, 2023
1 parent 5d29cf5 commit d649356
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions trie/zk_trie_database.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,8 @@ func (l *ZktrieDatabase) Get(key []byte) ([]byte, error) {
func (l *ZktrieDatabase) UpdatePreimage(preimage []byte, hashField *big.Int) {
db := l.db
if db.preimages != nil { // Ugly direct check but avoids the below write lock
db.lock.Lock()
// we must copy the input key
db.preimages.insertPreimage(map[common.Hash][]byte{common.BytesToHash(hashField.Bytes()): common.CopyBytes(preimage)})
db.lock.Unlock()
}
}

Expand Down

0 comments on commit d649356

Please sign in to comment.