Altered injection comments for consistencey

This commit is contained in:
philip-morlier
2022-12-06 16:37:18 -08:00
parent 1805f477ae
commit e3080c170c
2 changed files with 9 additions and 8 deletions
+4 -4
View File
@@ -917,18 +917,18 @@ func (s *StateDB) Commit(deleteEmptyObjects bool) (common.Hash, error) {
storageTrieNodes int
nodes = trie.NewMergedNodeSet()
)
// PluGeth injection
// begin PluGeth injection
codeUpdates := make(map[common.Hash][]byte)
// PluGeth injection
// end PluGeth injection
codeWriter := s.db.TrieDB().DiskDB().NewBatch()
for addr := range s.stateObjectsDirty {
if obj := s.stateObjects[addr]; !obj.deleted {
// Write any contract code associated with the state object
if obj.code != nil && obj.dirtyCode {
rawdb.WriteCode(codeWriter, common.BytesToHash(obj.CodeHash()), obj.code)
// PluGeth injection
// begin PluGeth injection
codeUpdates[common.BytesToHash(obj.CodeHash())] = obj.code
// PluGeth injection
// end PluGeth injection
obj.dirtyCode = false
}
// Write any storage changes in the state object to its storage trie