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
+2
View File
@@ -65,6 +65,7 @@ pallet-treasury = { version = "2.0.0", default-features = false, path = "../../.
pallet-utility = { version = "2.0.0", default-features = false, path = "../../../frame/utility" }
pallet-transaction-payment = { version = "2.0.0", default-features = false, path = "../../../frame/transaction-payment" }
pallet-transaction-payment-rpc-runtime-api = { version = "2.0.0", default-features = false, path = "../../../frame/transaction-payment/rpc/runtime-api/" }
pallet-vesting = { version = "2.0.0", default-features = false, path = "../../../frame/vesting" }
[build-dependencies]
wasm-builder-runner = { version = "1.0.4", package = "substrate-wasm-builder-runner", path = "../../../utils/wasm-builder-runner" }
@@ -125,4 +126,5 @@ std = [
"sp-version/std",
"pallet-society/std",
"pallet-recovery/std",
"pallet-vesting/std",
]
+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>},
}
);