-
Notifications
You must be signed in to change notification settings - Fork 766
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
migrate pallet-session-benchmarking to bench V2 syntax #6294
Changes from all commits
0d1ead0
c81bdb9
df232f9
26ef444
9aa51eb
2de515a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,7 +27,7 @@ use frame_support::{ | |
derive_impl, parameter_types, | ||
traits::{ConstU32, ConstU64}, | ||
}; | ||
use sp_runtime::{traits::IdentityLookup, BuildStorage}; | ||
use sp_runtime::{traits::IdentityLookup, BuildStorage, KeyTypeId}; | ||
|
||
type AccountId = u64; | ||
type Nonce = u32; | ||
|
@@ -42,6 +42,7 @@ frame_support::construct_runtime!( | |
Balances: pallet_balances, | ||
Staking: pallet_staking, | ||
Session: pallet_session, | ||
Historical: pallet_session::historical | ||
} | ||
); | ||
|
||
|
@@ -79,7 +80,8 @@ sp_runtime::impl_opaque_keys! { | |
|
||
pub struct TestSessionHandler; | ||
impl pallet_session::SessionHandler<AccountId> for TestSessionHandler { | ||
const KEY_TYPE_IDS: &'static [sp_runtime::KeyTypeId] = &[]; | ||
// corresponds to the opaque key id above | ||
const KEY_TYPE_IDS: &'static [KeyTypeId] = &[KeyTypeId([100u8, 117u8, 109u8, 121u8])]; | ||
Comment on lines
+83
to
+84
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This also failed on master. ---- mock::test_genesis_config_builds stdout ----
thread 'mock::test_genesis_config_builds' panicked at /home/clang/code/polkadot-sdk/substrate/frame/session/src/lib.rs:440:17:
Number of keys in session handler and session keys does not match
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
I was a bit surprised that There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I opened an issue: #6726 |
||
|
||
fn on_genesis_session<Ks: sp_runtime::traits::OpaqueKeys>(_validators: &[(AccountId, Ks)]) {} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This failed on master: