mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-28 16:47:57 +00:00
Update Block- and Extrinsic base weights (#5202)
* Remove constants:: module Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Update block+extrinsic weights Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * fmt Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Sanity check full block price Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Spellcheck on Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
This commit is contained in:
committed by
GitHub
parent
0e3f36224a
commit
cb8cf97cd2
@@ -104,13 +104,12 @@ mod tests {
|
||||
use runtime_common::MAXIMUM_BLOCK_WEIGHT;
|
||||
|
||||
#[test]
|
||||
// This function tests that the fee for `MAXIMUM_BLOCK_WEIGHT` of weight is correct
|
||||
// Test that the fee for `MAXIMUM_BLOCK_WEIGHT` of weight has sane bounds.
|
||||
fn full_block_fee_is_correct() {
|
||||
// A full block should cost 16 DOLLARS
|
||||
println!("Base: {}", ExtrinsicBaseWeight::get());
|
||||
let x = WeightToFee::calc(&MAXIMUM_BLOCK_WEIGHT);
|
||||
let y = 16 * DOLLARS;
|
||||
assert!(x.max(y) - x.min(y) < MILLICENTS);
|
||||
// A full block should cost between 10 and 100 DOLLARS.
|
||||
let full_block = WeightToFee::calc(&MAXIMUM_BLOCK_WEIGHT);
|
||||
assert!(full_block >= 10 * DOLLARS);
|
||||
assert!(full_block <= 100 * DOLLARS);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in New Issue
Block a user