Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
JesseAbram committed Aug 1, 2024
1 parent 9f7673a commit 9fb12cf
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pallets/propagation/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ pallet-staking-reward-curve ={ version="11.0.0" }
pallet-timestamp ={ version="28.0.0", default-features=false }
sp-keystore ={ version="0.35.0" }
sp-npos-elections ={ version="27.0.0", default-features=false }
pallet-parameters ={ version="0.2.0", path="../parameters", default-features=false }

[features]
default=['std']
Expand Down
9 changes: 8 additions & 1 deletion pallets/propagation/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ use frame_support::{
derive_impl, parameter_types,
traits::{ConstU32, FindAuthor, OneSessionHandler, Randomness},
};
use frame_system as system;
use frame_system::{self as system, EnsureRoot};
use pallet_session::historical as pallet_session_historical;
use sp_core::H256;
use sp_runtime::{
Expand Down Expand Up @@ -58,6 +58,7 @@ frame_support::construct_runtime!(
Session: pallet_session,
Historical: pallet_session_historical,
BagsList: pallet_bags_list,
Parameters: pallet_parameters,
}
);

Expand Down Expand Up @@ -360,6 +361,12 @@ impl pallet_propagation::Config for Test {
type RuntimeEvent = RuntimeEvent;
}

impl pallet_parameters::Config for Test {
type RuntimeEvent = RuntimeEvent;
type UpdateOrigin = EnsureRoot<Self::AccountId>;
type WeightInfo = ();
}

// Build genesis storage according to the mock runtime.
pub fn new_test_ext() -> sp_io::TestExternalities {
let mut t = system::GenesisConfig::<Test>::default().build_storage().unwrap();
Expand Down

0 comments on commit 9fb12cf

Please sign in to comment.