mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 18:32:23 +00:00
copy storage over in MoveTo
This commit is contained in:
parent
b3efbad585
commit
9aed710aa9
1 changed files with 5 additions and 2 deletions
|
|
@ -946,8 +946,11 @@ func (diff *StateOverride) ApplyMulticall(state *state.StateDB, precompiles vm.P
|
||||||
state.SetBalance(*account.MoveTo, state.GetBalance(addr))
|
state.SetBalance(*account.MoveTo, state.GetBalance(addr))
|
||||||
state.SetNonce(*account.MoveTo, state.GetNonce(addr))
|
state.SetNonce(*account.MoveTo, state.GetNonce(addr))
|
||||||
state.SetCode(*account.MoveTo, state.GetCode(addr))
|
state.SetCode(*account.MoveTo, state.GetCode(addr))
|
||||||
// TODO: copy storage over
|
// Copy storage over
|
||||||
//state.SetState(*account.MoveTo, state.GetState(addr))
|
state.ForEachStorage(addr, func(key, value common.Hash) bool {
|
||||||
|
state.SetState(*account.MoveTo, key, value)
|
||||||
|
return true
|
||||||
|
})
|
||||||
// Clear source storage
|
// Clear source storage
|
||||||
state.SetStorage(addr, map[common.Hash]common.Hash{})
|
state.SetStorage(addr, map[common.Hash]common.Hash{})
|
||||||
if precompiles[*account.MoveTo] != nil {
|
if precompiles[*account.MoveTo] != nil {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue