--- 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 { --- 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 } --- a/runtime/common/config/pallets/mod.rs +++ b/runtime/common/config/pallets/mod.rs @@ -101,8 +101,14 @@ type WeightInfo = pallet_balances::weights::SubstrateWeight; } +// 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 --- a/runtime/opal/Cargo.toml +++ b/runtime/opal/Cargo.toml @@ -232,6 +232,7 @@ preimage = [] refungible = [] session-test-timings = [] +fast-inflation = [] ################################################################################ # local dependencies --- a/runtime/quartz/Cargo.toml +++ b/runtime/quartz/Cargo.toml @@ -221,6 +221,7 @@ preimage = [] refungible = [] session-test-timings = [] +fast-inflation = [] ################################################################################ # local dependencies --- a/runtime/unique/Cargo.toml +++ b/runtime/unique/Cargo.toml @@ -224,6 +224,7 @@ preimage = [] refungible = [] session-test-timings = [] +fast-inflation = [] ################################################################################ # local dependencies