mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 16:57:58 +00:00
Unsigned transactions should also note weight (#4998)
* Make unsigned also note weight * Bump. * Fix tests * Better fee test * Fix another test * Update lock file
This commit is contained in:
@@ -25,13 +25,13 @@ use sp_core::{
|
||||
storage::Storage,
|
||||
};
|
||||
use sp_runtime::{
|
||||
Fixed64,
|
||||
Fixed64, Perbill,
|
||||
traits::Convert,
|
||||
};
|
||||
use node_runtime::{
|
||||
CheckedExtrinsic, Call, Runtime, Balances,
|
||||
TransactionPayment, TransactionBaseFee, TransactionByteFee,
|
||||
WeightFeeCoefficient, constants::currency::*,
|
||||
CheckedExtrinsic, Call, Runtime, Balances, TransactionPayment, TransactionBaseFee,
|
||||
TransactionByteFee, WeightFeeCoefficient,
|
||||
constants::currency::*,
|
||||
};
|
||||
use node_runtime::impls::LinearWeightToFee;
|
||||
use node_primitives::Balance;
|
||||
@@ -60,12 +60,12 @@ fn fee_multiplier_increases_and_decreases_on_big_weight() {
|
||||
GENESIS_HASH.into(),
|
||||
vec![
|
||||
CheckedExtrinsic {
|
||||
signed: None,
|
||||
function: Call::Timestamp(pallet_timestamp::Call::set(42 * 1000)),
|
||||
signed: None,
|
||||
function: Call::Timestamp(pallet_timestamp::Call::set(42 * 1000)),
|
||||
},
|
||||
CheckedExtrinsic {
|
||||
signed: Some((charlie(), signed_extra(0, 0))),
|
||||
function: Call::System(frame_system::Call::fill_block()),
|
||||
function: Call::System(frame_system::Call::fill_block(Perbill::from_percent(90))),
|
||||
}
|
||||
]
|
||||
);
|
||||
@@ -77,8 +77,8 @@ fn fee_multiplier_increases_and_decreases_on_big_weight() {
|
||||
block1.1.clone(),
|
||||
vec![
|
||||
CheckedExtrinsic {
|
||||
signed: None,
|
||||
function: Call::Timestamp(pallet_timestamp::Call::set(52 * 1000)),
|
||||
signed: None,
|
||||
function: Call::Timestamp(pallet_timestamp::Call::set(52 * 1000)),
|
||||
},
|
||||
CheckedExtrinsic {
|
||||
signed: Some((charlie(), signed_extra(1, 0))),
|
||||
@@ -87,7 +87,11 @@ fn fee_multiplier_increases_and_decreases_on_big_weight() {
|
||||
]
|
||||
);
|
||||
|
||||
println!("++ Block 1 size: {} / Block 2 size {}", block1.0.encode().len(), block2.0.encode().len());
|
||||
println!(
|
||||
"++ Block 1 size: {} / Block 2 size {}",
|
||||
block1.0.encode().len(),
|
||||
block2.0.encode().len(),
|
||||
);
|
||||
|
||||
// execute a big block.
|
||||
executor_call::<NeverNativeValue, fn() -> _>(
|
||||
|
||||
Reference in New Issue
Block a user