mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-30 04:57:57 +00:00
Collection of enhancement for staking/phragmen. (#5534)
* Collection of enhancement for staking phragmen. * Ditch signed extension * Fix build * Update frame/staking/src/lib.rs Co-Authored-By: thiolliere <gui.thiolliere@gmail.com> * Update frame/staking/src/tests.rs Co-Authored-By: thiolliere <gui.thiolliere@gmail.com> * Fix reward limits * Disallow payout_stakers * Remove unused import Co-authored-by: thiolliere <gui.thiolliere@gmail.com>
This commit is contained in:
@@ -2902,7 +2902,6 @@ mod offchain_phragmen {
|
||||
fn offchain_wont_work_if_snapshot_fails() {
|
||||
ExtBuilder::default()
|
||||
.offchain_phragmen_ext()
|
||||
.election_lookahead(3)
|
||||
.build()
|
||||
.execute_with(|| {
|
||||
run_to_block(12);
|
||||
@@ -2932,16 +2931,14 @@ mod offchain_phragmen {
|
||||
.execute_with(|| {
|
||||
run_to_block(12);
|
||||
assert!(Staking::snapshot_validators().is_some());
|
||||
// given
|
||||
assert_eq!(Staking::era_election_status(), ElectionStatus::Open(12));
|
||||
|
||||
let call = crate::Call::bond(999, 998, Default::default());
|
||||
let outer: mock::Call = call.into();
|
||||
|
||||
let lock_staking: LockStakingStatus<Test> = Default::default();
|
||||
assert_eq!(
|
||||
lock_staking.validate(&10, &outer, &Default::default(), Default::default(),),
|
||||
TransactionValidity::Err(InvalidTransaction::Stale.into()),
|
||||
)
|
||||
// chill et. al. are now not allowed.
|
||||
assert_noop!(
|
||||
Staking::chill(Origin::signed(10)),
|
||||
Error::<Test>::CallNotAllowed,
|
||||
);
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user