Tweaks from template downstream review #80 (#705)

* tweaks from template downstream review #80

* more tweaks

* Update parachain-template/node/src/command.rs

* tweaks to template and other chainspecs

* fmt

* update more tweaks from downstream

* fix build
This commit is contained in:
Dan Shields
2021-11-11 12:20:39 -07:00
committed by GitHub
parent 7100363a35
commit 496fab27b5
25 changed files with 107 additions and 132 deletions
@@ -88,7 +88,7 @@ fn register_validators<T: Config + session::Config>(count: u32) {
let validators = (0..count).map(|c| validator::<T>(c)).collect::<Vec<_>>();
for (who, keys) in validators {
<session::Pallet<T>>::set_keys(RawOrigin::Signed(who).into(), keys, vec![]).unwrap();
<session::Module<T>>::set_keys(RawOrigin::Signed(who).into(), keys, Vec::new()).unwrap();
}
}
@@ -160,7 +160,7 @@ benchmarks! {
<session::Pallet<T>>::set_keys(
RawOrigin::Signed(caller.clone()).into(),
keys::<T>(c + 1),
vec![]
Vec::new()
).unwrap();
}: _(RawOrigin::Signed(caller.clone()))
+1 -1
View File
@@ -145,7 +145,7 @@ impl From<UintAuthorityId> for MockSessionKeys {
}
parameter_types! {
pub static SessionHandlerCollators: Vec<u64> = vec![];
pub static SessionHandlerCollators: Vec<u64> = Vec::new();
pub static SessionChangeBlock: u64 = 0;
}
+1 -1
View File
@@ -188,7 +188,7 @@ fn register_as_candidate_works() {
// given
assert_eq!(CollatorSelection::desired_candidates(), 2);
assert_eq!(CollatorSelection::candidacy_bond(), 10);
assert_eq!(CollatorSelection::candidates(), vec![]);
assert_eq!(CollatorSelection::candidates(), Vec::new());
assert_eq!(CollatorSelection::invulnerables(), vec![1, 2]);
// take two endowed, non-invulnerables accounts.