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:
Kian Paimani
2020-02-20 16:46:11 +01:00
committed by GitHub
parent 9a0b8b5be5
commit b368736be4
6 changed files with 4545 additions and 4497 deletions
+14 -10
View File
@@ -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() -> _>(