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.SetNonce(*account.MoveTo, state.GetNonce(addr))
|
||||
state.SetCode(*account.MoveTo, state.GetCode(addr))
|
||||
// TODO: copy storage over
|
||||
//state.SetState(*account.MoveTo, state.GetState(addr))
|
||||
// Copy storage over
|
||||
state.ForEachStorage(addr, func(key, value common.Hash) bool {
|
||||
state.SetState(*account.MoveTo, key, value)
|
||||
return true
|
||||
})
|
||||
// Clear source storage
|
||||
state.SetStorage(addr, map[common.Hash]common.Hash{})
|
||||
if precompiles[*account.MoveTo] != nil {
|
||||
|
|
|
|||
Loading…
Reference in a new issue