mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-14 15:41:02 +00:00
Remove Default bound for AccountId (#10403)
* Remove Default for AccountId * More removals of default * Update frame/authorship/src/lib.rs Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> * Update frame/authorship/src/lib.rs Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> * Update frame/authorship/src/lib.rs Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> * Update frame/authorship/src/lib.rs Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> * More work * More work * Remove old code * More work * pallet-asset-tx-payment * tips * sc-consensus-babe * sc-finality-grandpa * sc-consensus-babe-rpc * sc-cli * make npos crates accept non-default account (#10420) * minimal changes to make npos pallets all work * make this pesky reduce.rs a bit cleaner * more work * more work * Tests build * Fix imonline tests * Formatting * Fixes * Fixes * Fix bench * Fixes * Fixes * Fixes * Fixes * Fixes * Formatting * Fixes * Formatting * Fixes * Formatting * Fixes * Formatting * Fixes * Formatting * Update client/keystore/src/local.rs Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> * Update client/finality-grandpa/src/lib.rs Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> * Update client/keystore/src/local.rs Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> * Update client/keystore/src/local.rs Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> * Update frame/staking/src/lib.rs Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> * Update frame/staking/src/lib.rs Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> * Update primitives/runtime/src/traits.rs Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> * Formatting Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> Co-authored-by: kianenigma <kian@parity.io>
This commit is contained in:
@@ -480,7 +480,7 @@ impl ExtBuilder {
|
||||
}
|
||||
|
||||
let _ = pallet_staking::GenesisConfig::<Test> {
|
||||
stakers,
|
||||
stakers: stakers.clone(),
|
||||
validator_count: self.validator_count,
|
||||
minimum_validator_count: self.minimum_validator_count,
|
||||
invulnerables: self.invulnerables,
|
||||
@@ -493,12 +493,15 @@ impl ExtBuilder {
|
||||
|
||||
let _ = pallet_session::GenesisConfig::<Test> {
|
||||
keys: if self.has_stakers {
|
||||
// genesis election will overwrite this, no worries.
|
||||
Default::default()
|
||||
// set the keys for the first session.
|
||||
stakers
|
||||
.into_iter()
|
||||
.map(|(id, ..)| (id, id, SessionKeys { other: id.into() }))
|
||||
.collect()
|
||||
} else {
|
||||
// set some dummy validators in genesis.
|
||||
(0..self.validator_count as u64)
|
||||
.map(|x| (x, x, SessionKeys { other: UintAuthorityId(x as u64) }))
|
||||
.map(|id| (id, id, SessionKeys { other: id.into() }))
|
||||
.collect()
|
||||
},
|
||||
}
|
||||
@@ -644,6 +647,7 @@ pub(crate) fn bond(stash: AccountId, ctrl: AccountId, val: Balance) {
|
||||
pub(crate) fn bond_validator(stash: AccountId, ctrl: AccountId, val: Balance) {
|
||||
bond(stash, ctrl, val);
|
||||
assert_ok!(Staking::validate(Origin::signed(ctrl), ValidatorPrefs::default()));
|
||||
assert_ok!(Session::set_keys(Origin::signed(ctrl), SessionKeys { other: ctrl.into() }, vec![]));
|
||||
}
|
||||
|
||||
pub(crate) fn bond_nominator(
|
||||
|
||||
Reference in New Issue
Block a user