Quellcode durchsuchen

runtime: storage: Rename pallet.

Shamil Gadelshin vor 3 Jahren
Ursprung
Commit
5e7f94c908

+ 3 - 3
Cargo.lock

@@ -2430,7 +2430,7 @@ dependencies = [
  "pallet-stake",
  "pallet-staking",
  "pallet-staking-reward-curve",
- "pallet-storage-v2",
+ "pallet-storage",
  "pallet-sudo",
  "pallet-timestamp",
  "pallet-token-mint",
@@ -4227,8 +4227,8 @@ dependencies = [
 ]
 
 [[package]]
-name = "pallet-storage-v2"
-version = "1.0.0"
+name = "pallet-storage"
+version = "4.0.0"
 dependencies = [
  "frame-benchmarking",
  "frame-support",

+ 1 - 1
Cargo.toml

@@ -18,7 +18,7 @@ members = [
 	"runtime-modules/versioned-store-permissions",
 	"runtime-modules/working-group",
 	"runtime-modules/content-directory",
-	"runtime-modules/storage-v2",
+	"runtime-modules/storage",
 	"node",
 	"utils/chain-spec-builder/",
 ]

+ 2 - 2
runtime-modules/storage-v2/Cargo.toml → runtime-modules/storage/Cargo.toml

@@ -1,6 +1,6 @@
 [package]
-name = 'pallet-storage-v2'
-version = '1.0.0'
+name = 'pallet-storage'
+version = '4.0.0'
 authors = ['Joystream contributors']
 edition = '2018'
 

+ 0 - 0
runtime-modules/storage-v2/src/bag_manager.rs → runtime-modules/storage/src/bag_manager.rs


+ 1 - 0
runtime-modules/storage-v2/src/benchmarking.rs → runtime-modules/storage/src/benchmarking.rs

@@ -37,6 +37,7 @@ mod tests {
     use crate::tests::mocks::{build_test_externalities, Test};
     use frame_support::assert_ok;
 
+    #[ignore] // until enabling the benchmarking for the pallet
     #[test]
     fn create_storage_bucket() {
         build_test_externalities().execute_with(|| {

+ 0 - 0
runtime-modules/storage-v2/src/lib.rs → runtime-modules/storage/src/lib.rs


+ 0 - 0
runtime-modules/storage-v2/src/storage_bucket_picker.rs → runtime-modules/storage/src/storage_bucket_picker.rs


+ 0 - 0
runtime-modules/storage-v2/src/tests/fixtures.rs → runtime-modules/storage/src/tests/fixtures.rs


+ 0 - 0
runtime-modules/storage-v2/src/tests/mocks.rs → runtime-modules/storage/src/tests/mocks.rs


+ 0 - 0
runtime-modules/storage-v2/src/tests/mod.rs → runtime-modules/storage/src/tests/mod.rs


+ 3 - 3
runtime/Cargo.toml

@@ -78,7 +78,7 @@ proposals-engine = { package = 'pallet-proposals-engine', default-features = fal
 proposals-discussion = { package = 'pallet-proposals-discussion', default-features = false, path = '../runtime-modules/proposals/discussion'}
 proposals-codex = { package = 'pallet-proposals-codex', default-features = false, path = '../runtime-modules/proposals/codex'}
 content-directory = { package = 'pallet-content-directory', default-features = false, path = '../runtime-modules/content-directory' }
-storage-v2 = { package = 'pallet-storage-v2', default-features = false, path = '../runtime-modules/storage-v2'}
+storage = { package = 'pallet-storage', default-features = false, path = '../runtime-modules/storage'}
 
 [dev-dependencies]
 sp-io = { package = 'sp-io', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '2cd20966cc09b059817c3ebe12fc130cdd850d62'}
@@ -154,7 +154,7 @@ std = [
     'proposals-discussion/std',
     'proposals-codex/std',
     'content-directory/std',
-    'storage-v2/std',
+    'storage/std',
 ]
 runtime-benchmarks = [
     'frame-system/runtime-benchmarks',
@@ -170,7 +170,7 @@ runtime-benchmarks = [
     'pallet-offences-benchmarking',
 	'pallet-session-benchmarking',
     'substrate-utility/runtime-benchmarks',
-    'storage-v2/runtime-benchmarks',
+    'storage/runtime-benchmarks',
     "hex-literal",
 ]
 

+ 5 - 6
runtime/src/lib.rs

@@ -63,7 +63,7 @@ pub use runtime_api::*;
 use integration::proposals::{CouncilManager, ExtrinsicProposalEncoder, MembershipOriginValidator};
 
 use governance::{council, election};
-use storage_v2::DynamicBagCreationPolicy;
+use storage::DynamicBagCreationPolicy;
 
 // Node dependencies
 pub use common;
@@ -79,7 +79,6 @@ pub use membership;
 pub use pallet_balances::Call as BalancesCall;
 pub use pallet_staking::StakerStatus;
 pub use proposals_codex::ProposalsConfigParameters;
-pub use storage_v2::DataObject;
 pub use versioned_store;
 pub use versioned_store_permissions;
 pub use working_group;
@@ -652,8 +651,8 @@ parameter_types! {
     pub const BlacklistSizeLimit: u64 = 10000; //TODO: adjust value
     pub const MaxRandomIterationNumber: u64 = 30; //TODO: adjust value
     pub const StorageModuleId: ModuleId = ModuleId(*b"mstorage"); // module storage
-    pub const StorageBucketsPerBagValueConstraint: storage_v2::StorageBucketsPerBagValueConstraint =
-        storage_v2::StorageBucketsPerBagValueConstraint {min: 3, max_min_diff: 7}; //TODO: adjust value
+    pub const StorageBucketsPerBagValueConstraint: storage::StorageBucketsPerBagValueConstraint =
+        storage::StorageBucketsPerBagValueConstraint {min: 3, max_min_diff: 7}; //TODO: adjust value
     pub const DefaultMemberDynamicBagCreationPolicy: DynamicBagCreationPolicy = DynamicBagCreationPolicy{
         number_of_storage_buckets: 4
     }; //TODO: adjust value
@@ -662,7 +661,7 @@ parameter_types! {
     }; //TODO: adjust value
 }
 
-impl storage_v2::Trait for Runtime {
+impl storage::Trait for Runtime {
     type Event = Event;
     type DataObjectId = DataObjectId;
     type StorageBucketId = StorageBucketId;
@@ -759,6 +758,6 @@ construct_runtime!(
         StorageWorkingGroup: working_group::<Instance2>::{Module, Call, Storage, Config<T>, Event<T>},
         ContentDirectoryWorkingGroup: working_group::<Instance3>::{Module, Call, Storage, Config<T>, Event<T>},
         //
-        StorageV2: storage_v2::{Module, Call, Storage, Event<T>},
+        Storage: storage::{Module, Call, Storage, Event<T>},
     }
 );