-
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
salary pallet migration to umbrella crate #7025
Conversation
@@ -22,10 +22,9 @@ | |||
use super::*; | |||
use crate::Pallet as Salary; | |||
|
|||
use frame_benchmarking::v2::*; | |||
use frame_system::{Pallet as System, RawOrigin}; | |||
use sp_core::Get; |
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.
use sp_core::Get; | |
use frame::deps::sp_core::Get; |
substrate/frame/salary/Cargo.toml
Outdated
"frame-benchmarking?/std", | ||
"frame-support/experimental", | ||
"frame-support/std", | ||
"frame-system/std", | ||
"log/std", | ||
"pallet-ranked-collective/std", | ||
"scale-info/std", | ||
"sp-arithmetic/std", |
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.
"sp-arithmetic/std", |
@@ -194,7 +193,7 @@ fn swap_exhaustive_works() { | |||
|
|||
// The events mess up the storage root: | |||
System::reset_events(); | |||
sp_io::storage::root(sp_runtime::StateVersion::V1) | |||
sp_io::storage::root( frame::deps::sp_runtime::StateVersion::V1) |
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.
Instead of using the whole path here, let's import this at the top and then use it.
All GitHub workflows were cancelled due to failure one of the required jobs. |
Closing this in favour of https://github.com/paritytech/polkadot-sdk/pull/7048/commits |
# Description Migrating salary pallet to use umbrella crate. It is a follow-up from #7025 Why did I create this new branch? I did this, so that the unnecessary cargo fmt changes from the previous branch are discarded and hence opened this new PR. ## Review Notes This PR migrates pallet-salary to use the umbrella crate. Added change: Explanation requested for why `TestExternalities` was replaced by `TestState` as testing_prelude already includes it `pub use sp_io::TestExternalities as TestState;` I have also modified the defensive! macro to be compatible with umbrella crate as it was being used in the salary pallet
β -----------------------------------------------------------------------------
Thank you for your Pull Request! π Please make sure it follows the contribution guidelines outlined in this
document and fill out the
sections below. Once you're ready to submit your PR for review, please delete this section and leave only the text under
the "Description" heading.
Description
Migrating salary pallet to use umbrella crates
Review Notes
This PR migrates pallet-salary to use the umbrella crate.
β -----------------------------------------------------------------------------