Skip to content

Commit c3d7169

Browse files
authored
core/tracker: trim state committees (#3868)
Under specific circumstances of attestation tracking feature flag being enabled AND block not being processed correctly (could be of multiple reasons), state committees were not cleaned up. Include trimming of state committees alongside with submissions. category: misc ticket: none
1 parent edc61df commit c3d7169

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

core/tracker/inclusion.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,15 @@ func (i *inclusionCore) Trim(ctx context.Context, slot uint64) {
227227

228228
delete(i.submissions, key)
229229
}
230+
231+
// Trim state committees
232+
for key := range i.stateCommittees {
233+
if uint64(key) > slot {
234+
continue
235+
}
236+
237+
delete(i.stateCommittees, key)
238+
}
230239
}
231240

232241
// CheckBlock checks whether the block includes any of the submitted duties.

0 commit comments

Comments
 (0)