good morning!!!!
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
E
Erigon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
a
Erigon
Commits
8de655ef
Commit
8de655ef
authored
7 years ago
by
DoubleWoodH
Committed by
Felix Lange
7 years ago
Browse files
Options
Downloads
Patches
Plain Diff
bmt: fix comment typos (#16461)
parent
3ebcf92b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bmt/bmt.go
+4
-5
4 additions, 5 deletions
bmt/bmt.go
with
4 additions
and
5 deletions
bmt/bmt.go
+
4
−
5
View file @
8de655ef
...
...
@@ -75,7 +75,7 @@ type Hasher struct {
blocksize
int
// segment size (size of hash) also for hash.Hash
count
int
// segment count
size
int
// for hash.Hash same as hashsize
cur
int
// cursor position for righmost currently open chunk
cur
int
// cursor position for righ
t
most currently open chunk
segment
[]
byte
// the rightmost open segment (not complete)
depth
int
// index of last level
result
chan
[]
byte
// result channel
...
...
@@ -149,7 +149,7 @@ func NewTreePool(hasher BaseHasher, segmentCount, capacity int) *TreePool {
}
}
// Drain drains the pool u
p
til it has no more than n resources
// Drain drains the pool u
n
til it has no more than n resources
func
(
self
*
TreePool
)
Drain
(
n
int
)
{
self
.
lock
.
Lock
()
defer
self
.
lock
.
Unlock
()
...
...
@@ -412,11 +412,10 @@ func (self *Hasher) Reset() {
// ResetWithLength needs to be called before writing to the hasher
// the argument is supposed to be the byte slice binary representation of
// the legth of the data subsumed under the hash
// the le
n
gth of the data subsumed under the hash
func
(
self
*
Hasher
)
ResetWithLength
(
l
[]
byte
)
{
self
.
Reset
()
self
.
blockLength
=
l
}
// Release gives back the Tree to the pool whereby it unlocks
...
...
@@ -531,7 +530,7 @@ func (self *Hasher) finalise(n *Node, i int) (d int) {
for
{
// when the final segment's path is going via left segments
// the incoming data is pushed to the parent upon pulling the left
// we do not need to
o
gle the state since this condition is
// we do not need to
g
gle the state since this condition is
// detectable
n
.
unbalanced
=
isLeft
n
.
right
=
nil
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment