mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-18 18:02:24 +00:00
core/state: rename variables
This commit is contained in:
parent
2534628542
commit
a9b943964b
1 changed files with 6 additions and 6 deletions
|
|
@ -940,9 +940,9 @@ func (s *StateDB) fastDeleteStorage(snaps *snapshot.Tree, addrHash common.Hash,
|
|||
defer iter.Release()
|
||||
|
||||
var (
|
||||
nodes = trienode.NewNodeSet(addrHash)
|
||||
slots = make(map[common.Hash][]byte)
|
||||
deletes = make(map[common.Hash][]byte)
|
||||
nodes = trienode.NewNodeSet(addrHash) // the set for trie node mutations (value is all nil)
|
||||
storages = make(map[common.Hash][]byte) // the set for storage mutations (value is all nil)
|
||||
storageOrigins = make(map[common.Hash][]byte) // the set for preserving the original slot value
|
||||
)
|
||||
stack := trie.NewStackTrie(func(path []byte, hash common.Hash, blob []byte) {
|
||||
nodes.AddNode(path, trienode.NewDeleted())
|
||||
|
|
@ -953,8 +953,8 @@ func (s *StateDB) fastDeleteStorage(snaps *snapshot.Tree, addrHash common.Hash,
|
|||
return nil, nil, nil, err
|
||||
}
|
||||
key := iter.Hash()
|
||||
slots[key] = slot
|
||||
deletes[key] = nil
|
||||
storageOrigins[key] = slot
|
||||
storages[key] = nil
|
||||
|
||||
if err := stack.Update(key.Bytes(), slot); err != nil {
|
||||
return nil, nil, nil, err
|
||||
|
|
@ -966,7 +966,7 @@ func (s *StateDB) fastDeleteStorage(snaps *snapshot.Tree, addrHash common.Hash,
|
|||
if stack.Hash() != root {
|
||||
return nil, nil, nil, fmt.Errorf("snapshot is not matched, exp %x, got %x", root, stack.Hash())
|
||||
}
|
||||
return deletes, slots, nodes, nil
|
||||
return storages, storageOrigins, nodes, nil
|
||||
}
|
||||
|
||||
// slowDeleteStorage serves as a less-efficient alternative to "fastDeleteStorage,"
|
||||
|
|
|
|||
Loading…
Reference in a new issue