git.delta.rocks / unique-network / refs/commits / 2c040b3e73e9

difftreelog

fix unused `on_runtime_upgrade()` was removed

PraetorP2023-04-19parent: #6e3cf5e.patch.diff
in: master
- AppPromo
- Common
- NonFungible

10 files changed

modifiedCargo.lockdiffbeforeafterboth
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -5996,7 +5996,7 @@
 
 [[package]]
 name = "pallet-app-promotion"
-version = "0.1.5"
+version = "0.1.6"
 dependencies = [
  "frame-benchmarking",
  "frame-support",
@@ -6262,7 +6262,7 @@
 
 [[package]]
 name = "pallet-common"
-version = "0.1.13"
+version = "0.1.14"
 dependencies = [
  "ethereum",
  "evm-coder",
@@ -6814,7 +6814,7 @@
 
 [[package]]
 name = "pallet-nonfungible"
-version = "0.1.13"
+version = "0.1.14"
 dependencies = [
  "evm-coder",
  "frame-benchmarking",
modifiedpallets/app-promotion/CHANGELOG.mddiffbeforeafterboth
--- a/pallets/app-promotion/CHANGELOG.md
+++ b/pallets/app-promotion/CHANGELOG.md
@@ -3,6 +3,11 @@
 All notable changes to this project will be documented in this file.
 
 <!-- bureaucrate goes here -->
+## [0.1.6] - 2023-04-19
+
+- ### Fixed
+
+- Useless `on_runtime_upgrade()` has been removed
 
 ## [0.1.5] - 2023-02-14
 
modifiedpallets/app-promotion/Cargo.tomldiffbeforeafterboth
--- a/pallets/app-promotion/Cargo.toml
+++ b/pallets/app-promotion/Cargo.toml
@@ -9,7 +9,7 @@
 license = 'GPLv3'
 name = 'pallet-app-promotion'
 repository = 'https://github.com/UniqueNetwork/unique-chain'
-version = '0.1.5'
+version = '0.1.6'
 
 [package.metadata.docs.rs]
 targets = ['x86_64-unknown-linux-gnu']
modifiedpallets/app-promotion/src/lib.rsdiffbeforeafterboth
--- a/pallets/app-promotion/src/lib.rs
+++ b/pallets/app-promotion/src/lib.rs
@@ -263,10 +263,6 @@
 	pub type PreviousCalculatedRecord<T: Config> =
 		StorageValue<Value = (T::AccountId, T::BlockNumber), QueryKind = OptionQuery>;
 
-	#[pallet::storage]
-	pub(crate) type UpgradedToReserves<T: Config> =
-		StorageValue<Value = bool, QueryKind = ValueQuery>;
-
 	#[pallet::hooks]
 	impl<T: Config> Hooks<BlockNumberFor<T>> for Pallet<T> {
 		/// Block overflow is impossible due to the fact that the unstake algorithm in on_initialize
@@ -289,12 +285,6 @@
 			}
 
 			<T as Config>::WeightInfo::on_initialize(counter)
-		}
-
-		fn on_runtime_upgrade() -> Weight {
-			<UpgradedToReserves<T>>::kill();
-
-			T::DbWeight::get().reads_writes(0, 1)
 		}
 	}
 
modifiedpallets/common/CHANGELOG.mddiffbeforeafterboth
--- a/pallets/common/CHANGELOG.md
+++ b/pallets/common/CHANGELOG.md
@@ -3,7 +3,12 @@
 All notable changes to this project will be documented in this file.
 
 <!-- bureaucrate goes here -->
+## [0.1.14] - 2023-04-19
+
+- ### Fixed
 
+- Useless `on_runtime_upgrade()` has been removed
+
 ## [0.1.13] - 2023-01-20
 
 ### Changed
@@ -76,7 +81,7 @@
 However, we don't use prefix removal limits, so upgrade is
 straightforward
 
-Upstream-Change: https://github.com/paritytech/substrate/pull/11490
+Upstream-Change: <https://github.com/paritytech/substrate/pull/11490>
 
 - build: Upgrade polkadot to v0.9.25 cdfb9bdc7b205ff1b5134f034ef9973d769e5e6b
 
modifiedpallets/common/Cargo.tomldiffbeforeafterboth
--- a/pallets/common/Cargo.toml
+++ b/pallets/common/Cargo.toml
@@ -2,7 +2,7 @@
 edition = "2021"
 license = "GPLv3"
 name = "pallet-common"
-version = "0.1.13"
+version = "0.1.14"
 
 [dependencies]
 # Note: `package = "parity-scale-codec"` must be supplied since the `Encode` macro searches for it.
modifiedpallets/common/src/lib.rsdiffbeforeafterboth
--- a/pallets/common/src/lib.rs
+++ b/pallets/common/src/lib.rs
@@ -869,15 +869,6 @@
 		),
 		QueryKind = OptionQuery,
 	>;
-
-	#[pallet::hooks]
-	impl<T: Config> Hooks<BlockNumberFor<T>> for Pallet<T> {
-		fn on_runtime_upgrade() -> Weight {
-			StorageVersion::new(1).put::<Pallet<T>>();
-
-			Weight::zero()
-		}
-	}
 }
 
 impl<T: Config> Pallet<T> {
modifiedpallets/nonfungible/CHANGELOG.mddiffbeforeafterboth
--- a/pallets/nonfungible/CHANGELOG.md
+++ b/pallets/nonfungible/CHANGELOG.md
@@ -3,7 +3,12 @@
 All notable changes to this project will be documented in this file.
 
 <!-- bureaucrate goes here -->
+## [0.1.14] - 2023-04-19
+
+- ### Fixed
 
+- Useless `on_runtime_upgrade()` has been removed
+
 ## [0.1.13] - 2023-01-20
 
 ### Fixed
@@ -77,7 +82,7 @@
 However, we don't use prefix removal limits, so upgrade is
 straightforward
 
-Upstream-Change: https://github.com/paritytech/substrate/pull/11490
+Upstream-Change: <https://github.com/paritytech/substrate/pull/11490>
 
 - build: Upgrade polkadot to v0.9.25 cdfb9bdc7b205ff1b5134f034ef9973d769e5e6b
 
modifiedpallets/nonfungible/Cargo.tomldiffbeforeafterboth
--- a/pallets/nonfungible/Cargo.toml
+++ b/pallets/nonfungible/Cargo.toml
@@ -2,7 +2,7 @@
 edition = "2021"
 license = "GPLv3"
 name = "pallet-nonfungible"
-version = "0.1.13"
+version = "0.1.14"
 
 [dependencies]
 # Note: `package = "parity-scale-codec"` must be supplied since the `Encode` macro searches for it.
modifiedpallets/nonfungible/src/lib.rsdiffbeforeafterboth
282 QueryKind = ValueQuery,282 QueryKind = ValueQuery,
283 >;283 >;
284
285 /// Upgrade from the old schema to properties.
286 #[pallet::hooks]
287 impl<T: Config> Hooks<BlockNumberFor<T>> for Pallet<T> {
288 fn on_runtime_upgrade() -> Weight {
289 StorageVersion::new(1).put::<Pallet<T>>();
290
291 Weight::zero()
292 }
293 }
294}284}
295285
296pub struct NonfungibleHandle<T: Config>(pallet_common::CollectionHandle<T>);286pub struct NonfungibleHandle<T: Config>(pallet_common::CollectionHandle<T>);