Skip to content

Commit 08611cf

Browse files
rjl493456442karalabe
authored andcommitted
trie: remove dead code (#20405)
1 parent 9a529d6 commit 08611cf

1 file changed

Lines changed: 0 additions & 14 deletions

File tree

‎trie/database.go‎

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
package trie
1818

1919
import (
20-
"encoding/binary"
2120
"errors"
2221
"fmt"
2322
"io"
@@ -272,19 +271,6 @@ func expandNode(hash hashNode, n node) node {
272271
}
273272
}
274273

275-
// trienodeHasher is a struct to be used with BigCache, which uses a Hasher to
276-
// determine which shard to place an entry into. It's not a cryptographic hash,
277-
// just to provide a bit of anti-collision (default is FNV64a).
278-
//
279-
// Since trie keys are already hashes, we can just use the key directly to
280-
// map shard id.
281-
type trienodeHasher struct{}
282-
283-
// Sum64 implements the bigcache.Hasher interface.
284-
func (t trienodeHasher) Sum64(key string) uint64 {
285-
return binary.BigEndian.Uint64([]byte(key))
286-
}
287-
288274
// NewDatabase creates a new trie database to store ephemeral trie content before
289275
// its written out to disk or garbage collected. No read cache is created, so all
290276
// data retrievals will hit the underlying disk database.

0 commit comments

Comments
 (0)