mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 11:07:56 +00:00
Rb staking pallet validator commission change event (#10827)
* commission-changed-event-and-deposit * deposit_event fix * commission_changed_event_works * fmt * CommissionChanged -> ValidatorPrefsUpdated * event ValidatorPrefs * updated commet * fmt * Update frame/staking/src/pallet/mod.rs Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com> * Update frame/staking/src/pallet/mod.rs Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com> * Update frame/staking/src/tests.rs Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com> Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com>
This commit is contained in:
@@ -4598,11 +4598,21 @@ fn capped_stakers_works() {
|
||||
#[test]
|
||||
fn min_commission_works() {
|
||||
ExtBuilder::default().build_and_execute(|| {
|
||||
// account 10 controls the stash from account 11
|
||||
assert_ok!(Staking::validate(
|
||||
Origin::signed(10),
|
||||
ValidatorPrefs { commission: Perbill::from_percent(5), blocked: false }
|
||||
));
|
||||
|
||||
// event emitted should be correct
|
||||
assert_eq!(
|
||||
*staking_events().last().unwrap(),
|
||||
Event::ValidatorPrefsSet(
|
||||
11,
|
||||
ValidatorPrefs { commission: Perbill::from_percent(5), blocked: false }
|
||||
)
|
||||
);
|
||||
|
||||
assert_ok!(Staking::set_staking_configs(
|
||||
Origin::root(),
|
||||
ConfigOp::Remove,
|
||||
|
||||
Reference in New Issue
Block a user