@@ -75,7 +75,7 @@ type Hasher struct {
75
75
blocksize int // segment size (size of hash) also for hash.Hash
76
76
count int // segment count
77
77
size int // for hash.Hash same as hashsize
78
- cur int // cursor position for righmost currently open chunk
78
+ cur int // cursor position for rightmost currently open chunk
79
79
segment []byte // the rightmost open segment (not complete)
80
80
depth int // index of last level
81
81
result chan []byte // result channel
@@ -149,7 +149,7 @@ func NewTreePool(hasher BaseHasher, segmentCount, capacity int) *TreePool {
149
149
}
150
150
}
151
151
152
- // Drain drains the pool uptil it has no more than n resources
152
+ // Drain drains the pool until it has no more than n resources
153
153
func (self * TreePool ) Drain (n int ) {
154
154
self .lock .Lock ()
155
155
defer self .lock .Unlock ()
@@ -412,11 +412,10 @@ func (self *Hasher) Reset() {
412
412
413
413
// ResetWithLength needs to be called before writing to the hasher
414
414
// the argument is supposed to be the byte slice binary representation of
415
- // the legth of the data subsumed under the hash
415
+ // the length of the data subsumed under the hash
416
416
func (self * Hasher ) ResetWithLength (l []byte ) {
417
417
self .Reset ()
418
418
self .blockLength = l
419
-
420
419
}
421
420
422
421
// 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) {
531
530
for {
532
531
// when the final segment's path is going via left segments
533
532
// the incoming data is pushed to the parent upon pulling the left
534
- // we do not need toogle the state since this condition is
533
+ // we do not need toggle the state since this condition is
535
534
// detectable
536
535
n .unbalanced = isLeft
537
536
n .right = nil
0 commit comments