migrate pallet-node-authorization to use umbrella crate (#7040)
# Description Migrate pallet-node-authorization to use umbrella crate. Part of #6504 ## Review Notes * This PR migrates pallet-node-authorization to use the umbrella crate. * Some imports like below have not been added to any prelude as they have very limited usage across the various pallets. ```rust use sp_core::OpaquePeerId as PeerId; ``` * Added a commonly used runtime trait for testing in the `testing_prelude` in `substrate/frame/src/lib.rs`: ```rust pub use sp_runtime::traits::BadOrigin; ``` * `weights.rs` uses the `weights_prelude` like: ```rust use frame::weights_prelude::*; ``` * `tests.rs` and `mock.rs` use the `testing_prelude`: ```rust use frame::testing_prelude::*; ``` * `lib.rs` uses the main `prelude` like: ```rust use frame::prelude::*; ``` * For testing: Checked that local build works and tests run successfully.
Showing
- Cargo.lock 1 addition, 5 deletionsCargo.lock
- prdoc/pr_7040.prdoc 16 additions, 0 deletionsprdoc/pr_7040.prdoc
- substrate/frame/node-authorization/Cargo.toml 3 additions, 13 deletionssubstrate/frame/node-authorization/Cargo.toml
- substrate/frame/node-authorization/src/lib.rs 7 additions, 7 deletionssubstrate/frame/node-authorization/src/lib.rs
- substrate/frame/node-authorization/src/mock.rs 3 additions, 5 deletionssubstrate/frame/node-authorization/src/mock.rs
- substrate/frame/node-authorization/src/tests.rs 1 addition, 2 deletionssubstrate/frame/node-authorization/src/tests.rs
- substrate/frame/node-authorization/src/weights.rs 1 addition, 2 deletionssubstrate/frame/node-authorization/src/weights.rs
- substrate/frame/src/lib.rs 3 additions, 0 deletionssubstrate/frame/src/lib.rs
Please register or sign in to comment