mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-16 18:00:46 +00:00
accouts, core: fix some comments (#21617)
This commit is contained in:
parent
b0063d39b9
commit
5b48621c36
4 changed files with 7 additions and 7 deletions
|
|
@ -88,7 +88,7 @@ type Wallet interface {
|
||||||
// to discover non zero accounts and automatically add them to list of tracked
|
// to discover non zero accounts and automatically add them to list of tracked
|
||||||
// accounts.
|
// accounts.
|
||||||
//
|
//
|
||||||
// Note, self derivaton will increment the last component of the specified path
|
// Note, self derivation will increment the last component of the specified path
|
||||||
// opposed to decending into a child path to allow discovering accounts starting
|
// opposed to decending into a child path to allow discovering accounts starting
|
||||||
// from non zero components.
|
// from non zero components.
|
||||||
//
|
//
|
||||||
|
|
|
||||||
|
|
@ -637,7 +637,7 @@ func (w *Wallet) Derive(path accounts.DerivationPath, pin bool) (accounts.Accoun
|
||||||
// to discover non zero accounts and automatically add them to list of tracked
|
// to discover non zero accounts and automatically add them to list of tracked
|
||||||
// accounts.
|
// accounts.
|
||||||
//
|
//
|
||||||
// Note, self derivaton will increment the last component of the specified path
|
// Note, self derivation will increment the last component of the specified path
|
||||||
// opposed to decending into a child path to allow discovering accounts starting
|
// opposed to decending into a child path to allow discovering accounts starting
|
||||||
// from non zero components.
|
// from non zero components.
|
||||||
//
|
//
|
||||||
|
|
|
||||||
|
|
@ -493,7 +493,7 @@ func (w *wallet) Derive(path accounts.DerivationPath, pin bool) (accounts.Accoun
|
||||||
// to discover non zero accounts and automatically add them to list of tracked
|
// to discover non zero accounts and automatically add them to list of tracked
|
||||||
// accounts.
|
// accounts.
|
||||||
//
|
//
|
||||||
// Note, self derivaton will increment the last component of the specified path
|
// Note, self derivation will increment the last component of the specified path
|
||||||
// opposed to decending into a child path to allow discovering accounts starting
|
// opposed to decending into a child path to allow discovering accounts starting
|
||||||
// from non zero components.
|
// from non zero components.
|
||||||
//
|
//
|
||||||
|
|
|
||||||
|
|
@ -174,7 +174,7 @@ func (s *stateObject) GetCommittedState(db Database, key common.Hash) common.Has
|
||||||
if s.fakeStorage != nil {
|
if s.fakeStorage != nil {
|
||||||
return s.fakeStorage[key]
|
return s.fakeStorage[key]
|
||||||
}
|
}
|
||||||
// Track the amount of time wasted on reading the storge trie
|
// Track the amount of time wasted on reading the storage trie
|
||||||
defer func(start time.Time) { s.db.StorageReads += time.Since(start) }(time.Now())
|
defer func(start time.Time) { s.db.StorageReads += time.Since(start) }(time.Now())
|
||||||
value := common.Hash{}
|
value := common.Hash{}
|
||||||
// Load from DB in case it is missing.
|
// Load from DB in case it is missing.
|
||||||
|
|
@ -272,7 +272,7 @@ func (s *stateObject) setState(key, value common.Hash) {
|
||||||
|
|
||||||
// updateTrie writes cached storage modifications into the object's storage trie.
|
// updateTrie writes cached storage modifications into the object's storage trie.
|
||||||
func (s *stateObject) updateTrie(db Database) Trie {
|
func (s *stateObject) updateTrie(db Database) Trie {
|
||||||
// Track the amount of time wasted on updating the storge trie
|
// Track the amount of time wasted on updating the storage trie
|
||||||
defer func(start time.Time) { s.db.StorageUpdates += time.Since(start) }(time.Now())
|
defer func(start time.Time) { s.db.StorageUpdates += time.Since(start) }(time.Now())
|
||||||
tr := s.getTrie(db)
|
tr := s.getTrie(db)
|
||||||
for key, value := range s.dirtyStorage {
|
for key, value := range s.dirtyStorage {
|
||||||
|
|
@ -292,7 +292,7 @@ func (s *stateObject) updateTrie(db Database) Trie {
|
||||||
func (s *stateObject) updateRoot(db Database) {
|
func (s *stateObject) updateRoot(db Database) {
|
||||||
s.updateTrie(db)
|
s.updateTrie(db)
|
||||||
|
|
||||||
// Track the amount of time wasted on hashing the storge trie
|
// Track the amount of time wasted on hashing the storage trie
|
||||||
defer func(start time.Time) { s.db.StorageHashes += time.Since(start) }(time.Now())
|
defer func(start time.Time) { s.db.StorageHashes += time.Since(start) }(time.Now())
|
||||||
|
|
||||||
s.data.Root = s.trie.Hash()
|
s.data.Root = s.trie.Hash()
|
||||||
|
|
@ -305,7 +305,7 @@ func (s *stateObject) CommitTrie(db Database) error {
|
||||||
if s.dbErr != nil {
|
if s.dbErr != nil {
|
||||||
return s.dbErr
|
return s.dbErr
|
||||||
}
|
}
|
||||||
// Track the amount of time wasted on committing the storge trie
|
// Track the amount of time wasted on committing the storage trie
|
||||||
defer func(start time.Time) { s.db.StorageCommits += time.Since(start) }(time.Now())
|
defer func(start time.Time) { s.db.StorageCommits += time.Since(start) }(time.Now())
|
||||||
|
|
||||||
root, err := s.trie.Commit(nil)
|
root, err := s.trie.Commit(nil)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue