Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张蕾
Geth-Modification
Commits
08611cfd
Commit
08611cfd
authored
Nov 28, 2019
by
gary rong
Committed by
Péter Szilágyi
Nov 28, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
trie: remove dead code (#20405)
parent
9a529d64
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
14 deletions
+0
-14
database.go
trie/database.go
+0
-14
No files found.
trie/database.go
View file @
08611cfd
...
...
@@ -17,7 +17,6 @@
package
trie
import
(
"encoding/binary"
"errors"
"fmt"
"io"
...
...
@@ -272,19 +271,6 @@ func expandNode(hash hashNode, n node) node {
}
}
// trienodeHasher is a struct to be used with BigCache, which uses a Hasher to
// determine which shard to place an entry into. It's not a cryptographic hash,
// just to provide a bit of anti-collision (default is FNV64a).
//
// Since trie keys are already hashes, we can just use the key directly to
// map shard id.
type
trienodeHasher
struct
{}
// Sum64 implements the bigcache.Hasher interface.
func
(
t
trienodeHasher
)
Sum64
(
key
string
)
uint64
{
return
binary
.
BigEndian
.
Uint64
([]
byte
(
key
))
}
// NewDatabase creates a new trie database to store ephemeral trie content before
// its written out to disk or garbage collected. No read cache is created, so all
// data retrievals will hit the underlying disk database.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment