mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-20 13:44:31 +00:00
trie: fix spelling mistakes (#1122)
This commit is contained in:
parent
67754ff3d4
commit
ea459d68a3
3 changed files with 5 additions and 5 deletions
|
|
@ -355,7 +355,7 @@ func unset(parent node, child node, key []byte, pos int, removeLeft bool) error
|
|||
if removeLeft {
|
||||
if bytes.Compare(cld.Key, key[pos:]) < 0 {
|
||||
// The key of fork shortnode is less than the path
|
||||
// (it belongs to the range), unset the entrie
|
||||
// (it belongs to the range), unset the entire
|
||||
// branch. The parent must be a fullnode.
|
||||
fn := parent.(*fullNode)
|
||||
fn.Children[key[pos-1]] = nil
|
||||
|
|
@ -367,7 +367,7 @@ func unset(parent node, child node, key []byte, pos int, removeLeft bool) error
|
|||
} else {
|
||||
if bytes.Compare(cld.Key, key[pos:]) > 0 {
|
||||
// The key of fork shortnode is greater than the
|
||||
// path(it belongs to the range), unset the entrie
|
||||
// path(it belongs to the range), unset the entire
|
||||
// branch. The parent must be a fullnode.
|
||||
fn := parent.(*fullNode)
|
||||
fn.Children[key[pos-1]] = nil
|
||||
|
|
|
|||
|
|
@ -479,7 +479,7 @@ func (st *StackTrie) Hash() (h common.Hash) {
|
|||
return h
|
||||
}
|
||||
|
||||
// Commit will firstly hash the entrie trie if it's still not hashed
|
||||
// Commit will firstly hash the entire trie if it's still not hashed
|
||||
// and then commit all nodes to the associated database. Actually most
|
||||
// of the trie nodes MAY have been committed already. The main purpose
|
||||
// here is to commit the root node.
|
||||
|
|
|
|||
|
|
@ -427,7 +427,7 @@ func benchUpdate(b *testing.B, e binary.ByteOrder) *Trie {
|
|||
}
|
||||
|
||||
// Benchmarks the trie hashing. Since the trie caches the result of any operation,
|
||||
// we cannot use b.N as the number of hashing rouns, since all rounds apart from
|
||||
// we cannot use b.N as the number of hashing rounds, since all rounds apart from
|
||||
// the first one will be NOOP. As such, we'll use b.N as the number of account to
|
||||
// insert into the trie before measuring the hashing.
|
||||
// BenchmarkHash-6 288680 4561 ns/op 682 B/op 9 allocs/op
|
||||
|
|
@ -469,7 +469,7 @@ type account struct {
|
|||
}
|
||||
|
||||
// Benchmarks the trie Commit following a Hash. Since the trie caches the result of any operation,
|
||||
// we cannot use b.N as the number of hashing rouns, since all rounds apart from
|
||||
// we cannot use b.N as the number of hashing rounds, since all rounds apart from
|
||||
// the first one will be NOOP. As such, we'll use b.N as the number of account to
|
||||
// insert into the trie before measuring the hashing.
|
||||
func BenchmarkCommitAfterHash(b *testing.B) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue