Skip to content

Commit

Permalink
renamed can_be_staked to is_staked
Browse files Browse the repository at this point in the history
  • Loading branch information
rwwwx committed Jul 12, 2024
1 parent 5cf4aa8 commit 41ef4f9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions program-states/src/state/deposit_entry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ impl DepositEntry {
/// Returns the weighted stake for the given deposit at the specified timestamp.
#[inline(always)]
pub fn weighted_stake(&self, curr_ts: u64) -> u64 {
if !self.can_be_staked() {
if !self.is_staked() {
return 0;
}

Expand All @@ -73,7 +73,7 @@ impl DepositEntry {
/// Weighted stake can be calculated only if `DepositEntry` is active,
/// and if both `LockupKind` and `LockupPeriod` not `None`.
#[inline(always)]
fn can_be_staked(&self) -> bool {
fn is_staked(&self) -> bool {
self.is_used
&& self.lockup.kind.ne(&LockupKind::None)
&& self.lockup.period.ne(&LockupPeriod::None)
Expand Down

0 comments on commit 41ef4f9

Please sign in to comment.