Skip to content
Snippets Groups Projects
Unverified Commit 69b7f176 authored by bgallois's avatar bgallois
Browse files

fix fees for small length

parent ea2ea84f
No related branches found
No related tags found
1 merge request!278Fix #235 allow remark in prod with a limit on extrinsic size for free transaction
Pipeline #38069 passed
......@@ -21,8 +21,8 @@
/// When the current block's weight and length are below the targeted thresholds, no fees are charged,
/// as the weight-to-fee conversion results in zero. Once the block's weight and length exceed these
/// targets, the weight-to-fee conversion maps 5 (5cG) to a base extrinsic weight.
/// Additionally, a fee is applied based on the length of the extrinsic and is mapped linearly:
/// 1_000 (10G) corresponds to an extrinsic length of 3.5 kilobytes and will be applied only if the extrinsic
/// Additionally, a fee is applied based on the length of the extrinsic and is mapped affinely:
/// 2_000 (20G) corresponds to an extrinsic length of 3.5 kilobytes and will be applied only if the extrinsic
/// exceeds 256 bytes or if the block target in weight or length is surpassed.
///
/// To further deter abuse, if the previous block's weight or length the target thresholds,
......@@ -103,7 +103,7 @@ where
{
0u32.into()
} else {
Self::Balance::saturated_from(length_in_bytes.ref_time() / 350u64)
Self::Balance::saturated_from(length_in_bytes.ref_time() / 350u64 + 5u64)
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment