trie: fix misspell+lint

This commit is contained in:
Martin Holst Swende 2020-01-07 07:55:48 +01:00
parent ed1e0c3dc7
commit ad914810cf
No known key found for this signature in database
GPG key ID: 683B438C05A5DDF0
2 changed files with 5 additions and 5 deletions

View file

@ -278,7 +278,7 @@ func (s *stateObject) finalise() {
func (s *stateObject) updateTrie(db Database) Trie { func (s *stateObject) updateTrie(db Database) Trie {
// Make sure all dirty slots are finalized into the pending storage area // Make sure all dirty slots are finalized into the pending storage area
s.finalise() s.finalise()
if len(s.pendingStorage) == 0{ if len(s.pendingStorage) == 0 {
return s.trie return s.trie
} }
// Track the amount of time wasted on updating the storge trie // Track the amount of time wasted on updating the storge trie
@ -310,7 +310,7 @@ func (s *stateObject) updateTrie(db Database) Trie {
// UpdateRoot sets the trie root to the current root hash of // UpdateRoot sets the trie root to the current root hash of
func (s *stateObject) updateRoot(db Database) { func (s *stateObject) updateRoot(db Database) {
if s.updateTrie(db) == nil{ if s.updateTrie(db) == nil {
// No changes, storage trie is not even loaded // No changes, storage trie is not even loaded
return return
} }
@ -324,7 +324,7 @@ func (s *stateObject) updateRoot(db Database) {
// CommitTrie the storage trie of the object to db. // CommitTrie the storage trie of the object to db.
// This updates the trie root. // This updates the trie root.
func (s *stateObject) CommitTrie(db Database) error { func (s *stateObject) CommitTrie(db Database) error {
if s.updateTrie(db) == nil{ if s.updateTrie(db) == nil {
// No changes, storage trie is not even loaded // No changes, storage trie is not even loaded
return nil return nil
} }

View file

@ -42,8 +42,8 @@ type Leaf struct {
// internal preallocated temp space, and also a callback that is invoked when // internal preallocated temp space, and also a callback that is invoked when
// leaves are committed. The leafs are passed through the `leafCh`, to allow // leaves are committed. The leafs are passed through the `leafCh`, to allow
// some level of paralellism. // some level of paralellism.
// By 'some level' of paralellism, it's still the case that all leaves will be // By 'some level' of parallelism, it's still the case that all leaves will be
// processed sequentially - onleaf will never be called in paralell or out of order. // processed sequentially - onleaf will never be called in parallel or out of order.
type committer struct { type committer struct {
tmp sliceBuffer tmp sliceBuffer
sha keccakState sha keccakState