Skip to content

Commit

Permalink
Multiply fees by 7
Browse files Browse the repository at this point in the history
  • Loading branch information
Moliholy committed Dec 11, 2024
1 parent aa7ae69 commit 2384a2c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion runtime/mainnet/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,8 @@ pub mod fee {
use smallvec::smallvec;
use sp_runtime::Perbill;

const FEE_MULTIPLIER: Balance = 7;

/// Handles converting a weight scalar to a fee value, based on the scale and granularity of the
/// node's balance type.
///
Expand All @@ -185,7 +187,7 @@ pub mod fee {
let proof_fee: Balance = proof_polynomial.eval(weight.proof_size());

// Take the maximum instead of the sum to charge by the more scarce resource.
ref_fee.max(proof_fee)
ref_fee.max(proof_fee) * FEE_MULTIPLIER
}
}

Expand Down
4 changes: 3 additions & 1 deletion runtime/testnet/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,8 @@ pub mod fee {
use smallvec::smallvec;
use sp_runtime::Perbill;

const FEE_MULTIPLIER: Balance = 7;

/// Handles converting a weight scalar to a fee value, based on the scale and granularity of the
/// node's balance type.
///
Expand All @@ -200,7 +202,7 @@ pub mod fee {
let proof_fee: Balance = proof_polynomial.eval(weight.proof_size());

// Take the maximum instead of the sum to charge by the more scarce resource.
ref_fee.max(proof_fee)
ref_fee.max(proof_fee) * FEE_MULTIPLIER
}
}

Expand Down

0 comments on commit 2384a2c

Please sign in to comment.