mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 02:42:27 +00:00
core/state: add method doc
This commit is contained in:
parent
2e079b3f03
commit
48f9af85fa
1 changed files with 6 additions and 0 deletions
|
|
@ -1365,6 +1365,9 @@ func copy2DSet[k comparable](set map[k]map[common.Hash][]byte) map[k]map[common.
|
||||||
return copied
|
return copied
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// markDelete is invoked when an account is deleted but the deletion is
|
||||||
|
// not yet committed. The pending mutation is cached and will be applied
|
||||||
|
// all together
|
||||||
func (s *StateDB) markDelete(addr common.Address) {
|
func (s *StateDB) markDelete(addr common.Address) {
|
||||||
if _, ok := s.mutations[addr]; !ok {
|
if _, ok := s.mutations[addr]; !ok {
|
||||||
s.mutations[addr] = &mutation{}
|
s.mutations[addr] = &mutation{}
|
||||||
|
|
@ -1373,6 +1376,9 @@ func (s *StateDB) markDelete(addr common.Address) {
|
||||||
s.mutations[addr].typ = deletion
|
s.mutations[addr].typ = deletion
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// markUpdate is invoked when an account is modified but the mutation is
|
||||||
|
// not yet committed. The pending mutation is cached and will be applied
|
||||||
|
// all together.
|
||||||
func (s *StateDB) markUpdate(addr common.Address) {
|
func (s *StateDB) markUpdate(addr common.Address) {
|
||||||
if _, ok := s.mutations[addr]; !ok {
|
if _, ok := s.mutations[addr]; !ok {
|
||||||
s.mutations[addr] = &mutation{}
|
s.mutations[addr] = &mutation{}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue