mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 15:47:58 +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:
@@ -28,7 +28,7 @@ use mock::{
|
||||
fn test_setup_works() {
|
||||
// Environment setup, logger storage, and sudo `key` retrieval should work as expected.
|
||||
new_test_ext(1).execute_with(|| {
|
||||
assert_eq!(Sudo::key(), 1u64);
|
||||
assert_eq!(Sudo::key(), Some(1u64));
|
||||
assert!(Logger::i32_log().is_empty());
|
||||
assert!(Logger::account_log().is_empty());
|
||||
});
|
||||
@@ -105,7 +105,7 @@ fn set_key_basics() {
|
||||
new_test_ext(1).execute_with(|| {
|
||||
// A root `key` can change the root `key`
|
||||
assert_ok!(Sudo::set_key(Origin::signed(1), 2));
|
||||
assert_eq!(Sudo::key(), 2u64);
|
||||
assert_eq!(Sudo::key(), Some(2u64));
|
||||
});
|
||||
|
||||
new_test_ext(1).execute_with(|| {
|
||||
@@ -123,10 +123,10 @@ fn set_key_emits_events_correctly() {
|
||||
|
||||
// A root `key` can change the root `key`.
|
||||
assert_ok!(Sudo::set_key(Origin::signed(1), 2));
|
||||
System::assert_has_event(TestEvent::Sudo(Event::KeyChanged { new_sudoer: 1 }));
|
||||
System::assert_has_event(TestEvent::Sudo(Event::KeyChanged { old_sudoer: Some(1) }));
|
||||
// Double check.
|
||||
assert_ok!(Sudo::set_key(Origin::signed(2), 4));
|
||||
System::assert_has_event(TestEvent::Sudo(Event::KeyChanged { new_sudoer: 2 }));
|
||||
System::assert_has_event(TestEvent::Sudo(Event::KeyChanged { old_sudoer: Some(2) }));
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user