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
8bf0565e
Unverified
Commit
8bf0565e
authored
3 years ago
by
Darioush Jalali
Committed by
GitHub
3 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
trie: remove unused makeHashNode (#24702)
parent
bb5633c5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
15 deletions
+1
-15
committer.go
trie/committer.go
+1
-15
No files found.
trie/committer.go
View file @
8bf0565e
...
...
@@ -22,8 +22,6 @@ import (
"sync"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/crypto"
"golang.org/x/crypto/sha3"
)
// leafChanSize is the size of the leafCh. It's a pretty arbitrary number, to allow
...
...
@@ -44,8 +42,6 @@ type leaf struct {
// By 'some level' of parallelism, it's still the case that all leaves will be
// processed sequentially - onleaf will never be called in parallel or out of order.
type
committer
struct
{
sha
crypto
.
KeccakState
onleaf
LeafCallback
leafCh
chan
*
leaf
}
...
...
@@ -53,9 +49,7 @@ type committer struct {
// committers live in a global sync.Pool
var
committerPool
=
sync
.
Pool
{
New
:
func
()
interface
{}
{
return
&
committer
{
sha
:
sha3
.
NewLegacyKeccak256
()
.
(
crypto
.
KeccakState
),
}
return
&
committer
{}
},
}
...
...
@@ -236,14 +230,6 @@ func (c *committer) commitLoop(db *Database) {
}
}
func
(
c
*
committer
)
makeHashNode
(
data
[]
byte
)
hashNode
{
n
:=
make
(
hashNode
,
c
.
sha
.
Size
())
c
.
sha
.
Reset
()
c
.
sha
.
Write
(
data
)
c
.
sha
.
Read
(
n
)
return
n
}
// estimateSize estimates the size of an rlp-encoded node, without actually
// rlp-encoding it (zero allocs). This method has been experimentally tried, and with a trie
// with 1000 leafs, the only errors above 1% are on small shortnodes, where this
...
...
This diff is collapsed.
Click to expand it.
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