mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 02:17:58 +00:00
Allow PostDispatchInfo to disable fees (#6749)
* initial mock * add test * remove unneeded clone * Update frame/support/src/weights.rs Co-authored-by: Alexander Theißen <alex.theissen@me.com> * fix compile * Update frame/support/src/weights.rs Co-authored-by: Alexander Popiak <alexander.popiak@parity.io> * Update frame/sudo/src/lib.rs Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> Co-authored-by: Alexander Theißen <alex.theissen@me.com> Co-authored-by: Alexander Popiak <alexander.popiak@parity.io> Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com> Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
This commit is contained in:
@@ -575,7 +575,10 @@ mod tests {
|
||||
new_test_ext().execute_with(|| {
|
||||
// This is half of the max block weight
|
||||
let info = DispatchInfo { weight: 512, ..Default::default() };
|
||||
let post_info = PostDispatchInfo { actual_weight: Some(128), };
|
||||
let post_info = PostDispatchInfo {
|
||||
actual_weight: Some(128),
|
||||
pays_fee: Default::default(),
|
||||
};
|
||||
let len = 0_usize;
|
||||
|
||||
// We allow 75% for normal transaction, so we put 25% - extrinsic base weight
|
||||
@@ -601,7 +604,10 @@ mod tests {
|
||||
fn signed_ext_check_weight_actual_weight_higher_than_max_is_capped() {
|
||||
new_test_ext().execute_with(|| {
|
||||
let info = DispatchInfo { weight: 512, ..Default::default() };
|
||||
let post_info = PostDispatchInfo { actual_weight: Some(700), };
|
||||
let post_info = PostDispatchInfo {
|
||||
actual_weight: Some(700),
|
||||
pays_fee: Default::default(),
|
||||
};
|
||||
let len = 0_usize;
|
||||
|
||||
BlockWeight::mutate(|current_weight| {
|
||||
|
||||
Reference in New Issue
Block a user