Skip to content

Commit

Permalink
fix(tests): fix eligibility tests
Browse files Browse the repository at this point in the history
  • Loading branch information
drcpu-github committed Aug 23, 2024
1 parent ea93e5c commit b69661b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions validations/src/eligibility/current.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ where
Err(e) => {
// Early exit if the stake key does not exist
return match e {
StakesError::EntryNotFound { .. } => Ok(IneligibilityReason::NotStaking.into()),
StakesError::ValidatorNotFound { .. } => Ok(IneligibilityReason::NotStaking.into()),
e => Err(e),
};
}
Expand Down Expand Up @@ -189,7 +189,7 @@ where
Err(e) => {
// Early exit if the stake key does not exist
return match e {
StakesError::EntryNotFound { .. } => {
StakesError::ValidatorNotFound { .. } => {
Ok((IneligibilityReason::NotStaking.into(), Hash::min(), 0.0))
}
e => Err(e),
Expand Down Expand Up @@ -264,7 +264,7 @@ mod tests {
let mut stakes = <Stakes<String, _, _, _>>::with_minimum(100u64);
let isk = "validator";

stakes.add_stake(isk, 1_000, 0).unwrap();
stakes.add_stake(isk, 10_000_000_000, 0).unwrap();

assert_eq!(
stakes.mining_eligibility(isk, 0),
Expand Down Expand Up @@ -303,7 +303,7 @@ mod tests {
let mut stakes = <Stakes<String, _, _, _>>::with_minimum(100u64);
let isk = "validator";

stakes.add_stake(isk, 1_000, 0).unwrap();
stakes.add_stake(isk, 10_000_000_000, 0).unwrap();

match stakes.witnessing_eligibility(isk, 0, 10, 0) {
Ok((eligible, _, _)) => {
Expand Down

0 comments on commit b69661b

Please sign in to comment.