Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fix grumble
  • Loading branch information
kianenigma committed Jul 19, 2020
commit 1016b971665b06e61a4b56dbbbb2d10ed4cb09d8
10 changes: 6 additions & 4 deletions frame/transaction-payment/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ pub trait MultiplierUpdate: Convert<Multiplier, Multiplier> {
/// Target block saturation level
fn target() -> Perquintill;
/// Variability factor
fn v() -> Multiplier;
fn variability() -> Multiplier;
}

impl MultiplierUpdate for () {
Expand All @@ -128,7 +128,7 @@ impl MultiplierUpdate for () {
fn target() -> Perquintill {
Default::default()
}
fn v() -> Multiplier {
fn variability() -> Multiplier {
Default::default()
}
}
Expand All @@ -142,7 +142,7 @@ impl<T, S, V, M> MultiplierUpdate for TargetedFeeAdjustment<T, S, V, M>
fn target() -> Perquintill {
S::get()
}
fn v() -> Multiplier {
fn variability() -> Multiplier {
V::get()
}
}
Expand Down Expand Up @@ -271,7 +271,9 @@ decl_module! {
// that if we collapse to minimum, the trend will be positive with a weight value
// which is 1% more than the target.
let min_value = T::FeeMultiplierUpdate::min();
let mut target = T::FeeMultiplierUpdate::target() * (T::AvailableBlockRatio::get() * T::MaximumBlockWeight::get());
let mut target =
T::FeeMultiplierUpdate::target() *
(T::AvailableBlockRatio::get() * T::MaximumBlockWeight::get());

// add 1 percent;
let addition = target / 100;
Expand Down