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.rsdiffbeforeafterboth--- a/runtime/common/config/pallets/mod.rs
+++ b/runtime/common/config/pallets/mod.rs
@@ -101,8 +101,14 @@
type WeightInfo = pallet_balances::weights::SubstrateWeight<Self>;
}
+// every time per how many blocks inflation is applied
+#[cfg(feature = "fast-inflation")]
+parameter_types! {
+ pub const InflationBlockInterval: BlockNumber = 10;
+}
+#[cfg(not(feature = "fast-inflation"))]
parameter_types! {
- pub const InflationBlockInterval: BlockNumber = 10; // every time per how many blocks inflation is applied
+ pub const InflationBlockInterval: BlockNumber = 100;
}
/// Pallet-inflation needs block number in on_initialize, where there is no `validation_data` exists yet
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.tomldiffbeforeafterboth221preimage = []221preimage = []222refungible = []222refungible = []223session-test-timings = []223session-test-timings = []224fast-inflation = []224225225################################################################################226################################################################################226# local dependencies227# local dependenciesruntime/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