Skip to content
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

[FRAME] Cleanup storage generator traits #5408

Open
wants to merge 20 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 11 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bridges/bin/runtime-common/src/integrity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ use bp_header_chain::ChainWithGrandpa;
use bp_messages::{ChainWithMessages, InboundLaneData, MessageNonce};
use bp_runtime::Chain;
use codec::Encode;
use frame_support::{storage::generator::StorageValue, traits::Get, weights::Weight};
use frame_support::{traits::Get, weights::Weight};
use frame_system::limits;
use pallet_bridge_messages::WeightInfoExt as _;

Expand Down
1 change: 0 additions & 1 deletion bridges/modules/grandpa/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -844,7 +844,6 @@ mod tests {
use frame_support::{
assert_err, assert_noop, assert_ok,
dispatch::{Pays, PostDispatchInfo},
storage::generator::StorageValue,
};
use frame_system::{EventRecord, Phase};
use sp_consensus_grandpa::{ConsensusLog, GRANDPA_ENGINE_ID};
Expand Down
7 changes: 1 addition & 6 deletions bridges/modules/messages/src/tests/pallet_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,7 @@ use bp_messages::{
use bp_runtime::{BasicOperatingMode, PreComputedSize, RangeInclusiveExt, Size};
use bp_test_utils::generate_owned_bridge_module_tests;
use codec::Encode;
use frame_support::{
assert_err, assert_noop, assert_ok,
dispatch::Pays,
storage::generator::{StorageMap, StorageValue},
weights::Weight,
};
use frame_support::{assert_err, assert_noop, assert_ok, dispatch::Pays, weights::Weight};
use frame_system::{EventRecord, Pallet as System, Phase};
use sp_core::Get;
use sp_runtime::{BoundedVec, DispatchError};
Expand Down
8 changes: 2 additions & 6 deletions bridges/modules/parachains/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -846,12 +846,8 @@ pub(crate) mod tests {
TEST_GRANDPA_SET_ID,
};
use frame_support::{
assert_noop, assert_ok,
dispatch::DispatchResultWithPostInfo,
pallet_prelude::Pays,
storage::generator::{StorageDoubleMap, StorageMap},
traits::Get,
weights::Weight,
assert_noop, assert_ok, dispatch::DispatchResultWithPostInfo, pallet_prelude::Pays,
traits::Get, weights::Weight,
};
use frame_system::{EventRecord, Pallet as System, Phase};
use sp_core::Hasher;
Expand Down
29 changes: 29 additions & 0 deletions prdoc/pr_5408.prdoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
title: [FRAME] Cleanup storage generator types
Doordashcon marked this conversation as resolved.
Show resolved Hide resolved
doc:
- audience: Runtime Dev
description: |
V1 pallet syntax has been deprecated and so the generator traits no longer needed,
However, all methods have been ported over to `storage::types` and made public for developers
that require them.
...

crates:
- name: frame-support
bump: minor
Doordashcon marked this conversation as resolved.
Show resolved Hide resolved
- name: bridge-runtime-common
bump: minor
- name: pallet-bridge-grandpa
bump: minor
- name: pallet-bridge-messages
bump: minor
- name: pallet-bridge-parachains
bump: minor
- name: pallet-bags-list-remote-tests
bump: minor
- name: pallet-bounties
bump: minor
- name: pallet-session
bump: minor
- name: substrate-frame-rpc-support
bump: minor

1 change: 0 additions & 1 deletion substrate/frame/bags-list/remote-tests/src/snapshot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ where
Block: BlockT + DeserializeOwned,
Block::Header: DeserializeOwned,
{
use frame_support::storage::generator::StorageMap;

let mut ext = Builder::<Block>::new()
.mode(Mode::Online(OnlineConfig {
Expand Down
1 change: 0 additions & 1 deletion substrate/frame/bags-list/remote-tests/src/try_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
//! Test to execute the sanity-check of the voter bag.

use frame_support::{
storage::generator::StorageMap,
traits::{Get, PalletInfoAccess},
};
use remote_externalities::{Builder, Mode, OnlineConfig};
Expand Down
1 change: 0 additions & 1 deletion substrate/frame/bounties/src/migrations/v4.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

use core::str;
use frame_support::{
storage::{generator::StorageValue, StoragePrefixedMap},
traits::{
Get, GetStorageVersion, PalletInfoAccess, StorageVersion,
STORAGE_VERSION_STORAGE_KEY_POSTFIX,
Expand Down
1 change: 0 additions & 1 deletion substrate/frame/session/src/migrations/v1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ use core::str;
use sp_io::hashing::twox_128;

use frame_support::{
storage::{generator::StorageValue, StoragePrefixedMap},
traits::{
Get, GetStorageVersion, PalletInfoAccess, StorageVersion,
STORAGE_VERSION_STORAGE_KEY_POSTFIX,
Expand Down
Loading
Loading