difftreelog
feat add fast-inflation flag
in: master
6 files changed
js-packages/tests/creditFeesToTreasury.seqtest.tsdiffbeforeafterboth33 const blockInterval = inflationBlockInterval.toNumber();33 const blockInterval = inflationBlockInterval.toNumber();34 const unsubscribe = await api.rpc.chain.subscribeNewHeads(head => {34 const unsubscribe = await api.rpc.chain.subscribeNewHeads(head => {35 const currentBlock = head.number.toNumber();35 const currentBlock = head.number.toNumber();36 if(currentBlock % blockInterval < blockInterval - 2) {36 if(currentBlock % blockInterval < blockInterval - (blockInterval / 5)) {37 unsubscribe();37 unsubscribe();38 resolve();38 resolve();39 } else {39 } else {pallets/inflation/Cargo.tomldiffbeforeafterboth27 'sp-std/std',27 'sp-std/std',28]28]29try-runtime = ["frame-support/try-runtime"]29try-runtime = ["frame-support/try-runtime"]30fast-inflation = []303131[dependencies]32[dependencies]32parity-scale-codec = { workspace = true }33parity-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.tomldiffbeforeafterboth232preimage = []232preimage = []233refungible = []233refungible = []234session-test-timings = []234session-test-timings = []235fast-inflation = []235236236################################################################################237################################################################################237# local dependencies238# local dependenciesruntime/quartz/Cargo.tomldiffbeforeafterboth221preimage = []221preimage = []222refungible = []222refungible = []223session-test-timings = []223session-test-timings = []224fast-inflation = []224225225################################################################################226################################################################################226# local dependencies227# local dependenciesruntime/unique/Cargo.tomldiffbeforeafterboth224preimage = []224preimage = []225refungible = []225refungible = []226session-test-timings = []226session-test-timings = []227fast-inflation = []227228228################################################################################229################################################################################229# local dependencies230# local dependencies