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:
Gavin Wood
2021-12-13 15:03:59 +01:00
committed by GitHub
parent a4ccc26e33
commit 1e24e45ea1
118 changed files with 998 additions and 4181 deletions
@@ -229,6 +229,10 @@ pub type AccountId = <Signature as Verify>::Signer;
pub type BlockNumber = u64;
pub type Index = u64;
fn test_pub() -> AccountId {
AccountId::from_raw([0; 32])
}
impl system::Config for Runtime {
type BaseCallFilter = frame_support::traits::Everything;
type Hash = H256;
@@ -451,13 +455,13 @@ fn event_codec() {
let event = system::Event::<Runtime>::ExtrinsicSuccess;
assert_eq!(Event::from(event).encode()[0], 30);
let event = module1::Event::<Runtime, module1::Instance1>::A(Default::default());
let event = module1::Event::<Runtime, module1::Instance1>::A(test_pub());
assert_eq!(Event::from(event).encode()[0], 31);
let event = module2::Event::A;
assert_eq!(Event::from(event).encode()[0], 32);
let event = module1::Event::<Runtime, module1::Instance2>::A(Default::default());
let event = module1::Event::<Runtime, module1::Instance2>::A(test_pub());
assert_eq!(Event::from(event).encode()[0], 33);
let event = nested::module3::Event::A;
@@ -466,19 +470,19 @@ fn event_codec() {
let event = module3::Event::A;
assert_eq!(Event::from(event).encode()[0], 35);
let event = module1::Event::<Runtime, module1::Instance5>::A(Default::default());
let event = module1::Event::<Runtime, module1::Instance5>::A(test_pub());
assert_eq!(Event::from(event).encode()[0], 4);
let event = module1::Event::<Runtime, module1::Instance6>::A(Default::default());
let event = module1::Event::<Runtime, module1::Instance6>::A(test_pub());
assert_eq!(Event::from(event).encode()[0], 1);
let event = module1::Event::<Runtime, module1::Instance7>::A(Default::default());
let event = module1::Event::<Runtime, module1::Instance7>::A(test_pub());
assert_eq!(Event::from(event).encode()[0], 2);
let event = module1::Event::<Runtime, module1::Instance8>::A(Default::default());
let event = module1::Event::<Runtime, module1::Instance8>::A(test_pub());
assert_eq!(Event::from(event).encode()[0], 12);
let event = module1::Event::<Runtime, module1::Instance9>::A(Default::default());
let event = module1::Event::<Runtime, module1::Instance9>::A(test_pub());
assert_eq!(Event::from(event).encode()[0], 13);
}