We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f6f17a7 commit 8a40954Copy full SHA for 8a40954
plugin/evm/validators/state/state.go
@@ -197,13 +197,14 @@ func (s *state) WriteState() error {
197
if err := batch.Delete(vID[:]); err != nil {
198
return err
199
}
200
- default:
201
- return fmt.Errorf("unknown update status for %s", vID)
202
203
- // we're done, remove the updated marker
204
- delete(s.updatedData, vID)
205
206
- return batch.Write()
+ if err := batch.Write(); err != nil {
+ return err
+ }
+ // we've successfully flushed the updates, clear the updated marker.
+ clear(s.updatedData)
207
+ return nil
208
209
210
// SetStatus sets the active status of the validator with the given vID
0 commit comments