Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
Fix join test
Browse files Browse the repository at this point in the history
  • Loading branch information
emostov committed Mar 14, 2022
1 parent 4554224 commit 9721dd1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion frame/nomination-pools/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -634,8 +634,8 @@ impl<T: Config> BondedPool<T> {

/// Check that the pool can accept a member with `new_funds`.
fn ok_to_join(&self) -> Result<(), DispatchError> {
self.ok_to_be_open()?;
ensure!(self.state == PoolState::Open, Error::<T>::NotOpen);
self.ok_to_be_open()?;
Ok(())
}

Expand Down
2 changes: 1 addition & 1 deletion frame/nomination-pools/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ mod join {
// Balance is gt 1/10 of Balance::MAX
assert_noop!(Pools::join(Origin::signed(11), 5, 123), Error::<Runtime>::OverflowRisk);

StakingMock::set_bonded_balance(123, 100);
StakingMock::set_bonded_balance(PRIMARY_ACCOUNT, 10);
// Cannot join a pool that isn't open
unsafe_set_state(&PRIMARY_ACCOUNT, PoolState::Blocked).unwrap();
assert_noop!(
Expand Down

0 comments on commit 9721dd1

Please sign in to comment.