mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-22 04:36:42 +00:00
core/state: fix code existence not marked correctly
This commit is contained in:
parent
e20b05ec7f
commit
0d27dffbc4
1 changed files with 4 additions and 4 deletions
|
|
@ -83,8 +83,8 @@ type stateUpdate struct {
|
||||||
storagesOrigin map[common.Address]map[common.Hash][]byte
|
storagesOrigin map[common.Address]map[common.Hash][]byte
|
||||||
rawStorageKey bool
|
rawStorageKey bool
|
||||||
|
|
||||||
codes map[common.Address]contractCode // codes contains the set of dirty codes
|
codes map[common.Address]*contractCode // codes contains the set of dirty codes
|
||||||
nodes *trienode.MergedNodeSet // Aggregated dirty nodes caused by state changes
|
nodes *trienode.MergedNodeSet // Aggregated dirty nodes caused by state changes
|
||||||
}
|
}
|
||||||
|
|
||||||
// empty returns a flag indicating the state transition is empty or not.
|
// empty returns a flag indicating the state transition is empty or not.
|
||||||
|
|
@ -104,7 +104,7 @@ func newStateUpdate(rawStorageKey bool, originRoot common.Hash, root common.Hash
|
||||||
accountsOrigin = make(map[common.Address][]byte)
|
accountsOrigin = make(map[common.Address][]byte)
|
||||||
storages = make(map[common.Hash]map[common.Hash][]byte)
|
storages = make(map[common.Hash]map[common.Hash][]byte)
|
||||||
storagesOrigin = make(map[common.Address]map[common.Hash][]byte)
|
storagesOrigin = make(map[common.Address]map[common.Hash][]byte)
|
||||||
codes = make(map[common.Address]contractCode)
|
codes = make(map[common.Address]*contractCode)
|
||||||
)
|
)
|
||||||
// Since some accounts might be destroyed and recreated within the same
|
// Since some accounts might be destroyed and recreated within the same
|
||||||
// block, deletions must be aggregated first.
|
// block, deletions must be aggregated first.
|
||||||
|
|
@ -126,7 +126,7 @@ func newStateUpdate(rawStorageKey bool, originRoot common.Hash, root common.Hash
|
||||||
// Aggregate dirty contract codes if they are available.
|
// Aggregate dirty contract codes if they are available.
|
||||||
addr := op.address
|
addr := op.address
|
||||||
if op.code != nil {
|
if op.code != nil {
|
||||||
codes[addr] = *op.code
|
codes[addr] = op.code
|
||||||
}
|
}
|
||||||
accounts[addrHash] = op.data
|
accounts[addrHash] = op.data
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue