difftreelog
feat add fast-inflation flag
in: master
6 files changed
js-packages/tests/creditFeesToTreasury.seqtest.tsdiffbeforeafterboth--- a/js-packages/tests/creditFeesToTreasury.seqtest.ts
+++ b/js-packages/tests/creditFeesToTreasury.seqtest.ts
@@ -33,7 +33,7 @@
const blockInterval = inflationBlockInterval.toNumber();
const unsubscribe = await api.rpc.chain.subscribeNewHeads(head => {
const currentBlock = head.number.toNumber();
- if(currentBlock % blockInterval < blockInterval - 2) {
+ if(currentBlock % blockInterval < blockInterval - (blockInterval / 5)) {
unsubscribe();
resolve();
} else {
pallets/inflation/Cargo.tomldiffbeforeafterboth--- a/pallets/inflation/Cargo.toml
+++ b/pallets/inflation/Cargo.toml
@@ -27,6 +27,7 @@
'sp-std/std',
]
try-runtime = ["frame-support/try-runtime"]
+fast-inflation = []
[dependencies]
parity-scale-codec = { workspace = true }
runtime/common/config/pallets/mod.rsdiffbeforeafterboth101 type WeightInfo = pallet_balances::weights::SubstrateWeight<Self>;101 type WeightInfo = pallet_balances::weights::SubstrateWeight<Self>;102}102}103103104// every time per how many blocks inflation is applied105#[cfg(feature = "fast-inflation")]104parameter_types! {106parameter_types! {105 pub const InflationBlockInterval: BlockNumber = 10; // every time per how many blocks inflation is applied107 pub const InflationBlockInterval: BlockNumber = 10;106}108}109#[cfg(not(feature = "fast-inflation"))]110parameter_types! {111 pub const InflationBlockInterval: BlockNumber = 100;112}107113108/// Pallet-inflation needs block number in on_initialize, where there is no `validation_data` exists yet114/// Pallet-inflation needs block number in on_initialize, where there is no `validation_data` exists yet109pub struct OnInitializeBlockNumberProvider;115pub struct OnInitializeBlockNumberProvider;runtime/opal/Cargo.tomldiffbeforeafterboth--- a/runtime/opal/Cargo.toml
+++ b/runtime/opal/Cargo.toml
@@ -232,6 +232,7 @@
preimage = []
refungible = []
session-test-timings = []
+fast-inflation = []
################################################################################
# local dependencies
runtime/quartz/Cargo.tomldiffbeforeafterboth--- a/runtime/quartz/Cargo.toml
+++ b/runtime/quartz/Cargo.toml
@@ -221,6 +221,7 @@
preimage = []
refungible = []
session-test-timings = []
+fast-inflation = []
################################################################################
# local dependencies
runtime/unique/Cargo.tomldiffbeforeafterboth--- a/runtime/unique/Cargo.toml
+++ b/runtime/unique/Cargo.toml
@@ -224,6 +224,7 @@
preimage = []
refungible = []
session-test-timings = []
+fast-inflation = []
################################################################################
# local dependencies