Skip to content

Commit

Permalink
revert: _data -> `data
Browse files Browse the repository at this point in the history
  • Loading branch information
vgorkavenko committed May 9, 2024
1 parent e37b757 commit 4f3dddd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/modules/csm/state.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def perf(self) -> float:
@dataclass
class State(UserDict[ValidatorIndex, AttestationsAggregate]):
"""Tracks processing state of CSM performance oracle frame"""
_data: dict[ValidatorIndex, AttestationsAggregate] = field(default_factory=dict)
data: dict[ValidatorIndex, AttestationsAggregate] = field(default_factory=dict)
_epochs_to_process: set[EpochNumber] = field(default_factory=set)
_processed_epochs: set[EpochNumber] = field(default_factory=set)

Expand Down Expand Up @@ -64,7 +64,7 @@ def commit(self) -> None:
os.replace(self.buffer, self.file())

def clear(self) -> None:
self._data = {}
self.data = {}
self._epochs_to_process.clear()
self._processed_epochs.clear()
assert self.is_empty
Expand Down Expand Up @@ -132,7 +132,7 @@ def validate_for_collect(self, l_epoch: EpochNumber, r_epoch: EpochNumber):

@property
def is_empty(self) -> bool:
return not self._data and not self._epochs_to_process and not self._processed_epochs
return not self.data and not self._epochs_to_process and not self._processed_epochs

@property
def unprocessed_epochs(self) -> set[EpochNumber]:
Expand Down

0 comments on commit 4f3dddd

Please sign in to comment.