mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-08 07:58:40 +00:00
core/state: handle err returned by UpdateContractCode in StateDB.updateStateObject
This commit is contained in:
parent
f0b21fa110
commit
57e72925eb
1 changed files with 3 additions and 1 deletions
|
|
@ -574,7 +574,9 @@ func (s *StateDB) updateStateObject(obj *stateObject) {
|
||||||
s.setError(fmt.Errorf("updateStateObject (%x) error: %v", obj.Address(), err))
|
s.setError(fmt.Errorf("updateStateObject (%x) error: %v", obj.Address(), err))
|
||||||
}
|
}
|
||||||
if obj.dirtyCode {
|
if obj.dirtyCode {
|
||||||
s.trie.UpdateContractCode(obj.Address(), common.BytesToHash(obj.CodeHash()), obj.code)
|
if err := s.trie.UpdateContractCode(obj.Address(), common.BytesToHash(obj.CodeHash()), obj.code); err != nil {
|
||||||
|
s.setError(fmt.Errorf("updateStateObject (%x) error: %v", obj.Address(), err))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue