-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Fix/staking #6
Fix/staking #6
Conversation
return synced_data, Event.NEXT_CHECKPOINT_NOT_REACHED_YET | ||
if ( | ||
synced_data.most_voted_tx_hash is None | ||
and synced_data.is_staking_kpi_met == False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and synced_data.is_staking_kpi_met == False | |
and synced_data.is_staking_kpi_met is False |
kpi_met_for_the_day: Optional[bool] | ||
is_staking_kpi_met: Optional[bool] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now that there are so many common attributes you can convert CallCheckpointPayload
to:
@dataclass(frozen=True)
class CallCheckpointPayload(BaseTxPayload):
"""A transaction payload for the CallCheckpointRound."""
service_staking_state: int
min_num_of_safe_tx_required: Optional[int]
if ( | ||
synced_data.most_voted_tx_hash is None | ||
and synced_data.is_staking_kpi_met == True | ||
): | ||
return synced_data, Event.STAKING_KPI_MET |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if ( | |
synced_data.most_voted_tx_hash is None | |
and synced_data.is_staking_kpi_met == True | |
): | |
return synced_data, Event.STAKING_KPI_MET | |
if ( | |
synced_data.most_voted_tx_hash is None | |
and synced_data.is_staking_kpi_met is True | |
): | |
return synced_data, Event.STAKING_KPI_MET |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In CallCheckpointRound
, what if both is_staking_kpi_met
and most_voted_tx_hash
are None
? Shouldn't we re-enter CallCheckpointRound
instead?
fix logic to consider the service active and eligible for rewards, even if it joins in between a liveness period