Don't attempt to upgrade balances module on chain start (#4802)

* Introduce vesting to node, debug message for upgrades and fix them

* Bump spec version
This commit is contained in:
Gavin Wood
2020-02-01 18:08:39 +00:00
committed by GitHub
parent 98255bd37e
commit 1c9418d748
6 changed files with 19 additions and 5 deletions
+9 -3
View File
@@ -35,8 +35,7 @@ use sp_runtime::{
use sp_runtime::curve::PiecewiseLinear;
use sp_runtime::transaction_validity::TransactionValidity;
use sp_runtime::traits::{
self, BlakeTwo256, Block as BlockT, StaticLookup, SaturatedConversion,
OpaqueKeys,
self, BlakeTwo256, Block as BlockT, StaticLookup, SaturatedConversion, ConvertInto, OpaqueKeys,
};
use sp_version::RuntimeVersion;
#[cfg(any(feature = "std", test))]
@@ -80,7 +79,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
// and set impl_version to 0. If only runtime
// implementation changes and behavior does not, then leave spec_version as
// is and increment impl_version.
spec_version: 211,
spec_version: 212,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
};
@@ -586,6 +585,12 @@ impl pallet_society::Trait for Runtime {
type ChallengePeriod = ChallengePeriod;
}
impl pallet_vesting::Trait for Runtime {
type Event = Event;
type Currency = Balances;
type BlockNumberToBalance = ConvertInto;
}
construct_runtime!(
pub enum Runtime where
Block = Block,
@@ -619,6 +624,7 @@ construct_runtime!(
Identity: pallet_identity::{Module, Call, Storage, Event<T>},
Society: pallet_society::{Module, Call, Storage, Event<T>, Config<T>},
Recovery: pallet_recovery::{Module, Call, Storage, Event<T>},
Vesting: pallet_vesting::{Module, Call, Storage, Event<T>, Config<T>},
}
);