core/state: fix StateDB Reader Error Discard After Commit

This commit is contained in:
Weixie Cui 2026-05-07 21:11:45 +08:00
parent aaa2b66285
commit d632d91e6c

View file

@ -1355,7 +1355,7 @@ func (s *StateDB) commitAndFlush(block uint64, deleteEmptyObjects bool, noStorag
// The reader update must be performed as the final step, otherwise, // The reader update must be performed as the final step, otherwise,
// the new state would not be visible before db.commit. // the new state would not be visible before db.commit.
s.reader, _ = s.db.Reader(s.originalRoot) s.reader, err = s.db.Reader(s.originalRoot)
return ret, err return ret, err
} }