Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ pub const MAX_SUPPLY: Balance = 21_000_000 * UNIT;
/// Percentage rates (wormhole bps, reversal/step factors), the existential
/// deposit, and the 0.01-QTC circuit quanta are deliberately not scaled.
pub const FEE_SCALE_NUM: Balance = 1;
pub const FEE_SCALE_DEN: Balance = 1;
pub const FEE_SCALE_DEN: Balance = 10;

pub const fn scale_fee(base: Balance) -> Balance {
base * FEE_SCALE_NUM / FEE_SCALE_DEN
Expand Down
6 changes: 3 additions & 3 deletions runtime/tests/transactions/high_security_tip.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ use qp_dilithium_crypto::Dilithium65Pair;
use qp_scheduler::BlockNumberOrTimestamp;
use qp_wormhole::{derive_wormhole_address, POW_ENGINE_ID};
use quantus_runtime::{
transaction_extensions::HIGH_SECURITY_TIP_FORBIDDEN, Balances, Executive, MiningRewards,
ReversibleTransfers, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, System,
scale_fee, transaction_extensions::HIGH_SECURITY_TIP_FORBIDDEN, Balances, Executive,
MiningRewards, ReversibleTransfers, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, System,
UncheckedExtrinsic, EXISTENTIAL_DEPOSIT, MILLI_UNIT, UNIT,
};
use sp_core::Pair;
Expand Down Expand Up @@ -259,7 +259,7 @@ fn high_security_padded_dest_is_rejected_before_fees() {
let id_xt = signed_call(&pair, account.clone(), schedule_small_transfer(), 0, 0);
let raw_xt = signed_call(&pair, account.clone(), padded_schedule_transfer(PAD), 0, 0);
assert!(
inclusion_fee(&raw_xt) > inclusion_fee(&id_xt) + 50 * MILLI_UNIT,
inclusion_fee(&raw_xt) > inclusion_fee(&id_xt) + scale_fee(50 * MILLI_UNIT),
"padded dest must inflate the chain-decided inclusion fee, got id={} raw={}",
inclusion_fee(&id_xt),
inclusion_fee(&raw_xt)
Expand Down
Loading