Skip to content

Commit

Permalink
Update cumulus/pallets/weight-reclaim-tx/src/lib.rs
Browse files Browse the repository at this point in the history
Co-authored-by: georgepisaltu <[email protected]>
  • Loading branch information
gui1117 and georgepisaltu authored Aug 6, 2024
1 parent 51d91b9 commit 30f8f4e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions cumulus/pallets/weight-reclaim-tx/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,12 @@ where
) -> Result<Option<Weight>, TransactionValidityError> {
let (pre_dispatch_proof_size, inner_pre) = pre;

let inner_weight =
S::post_dispatch_details(inner_pre, info, post_info, len, result, context)?;
let mut actual_post_info = *post_info;
S::post_dispatch(inner_pre, info, &mut actual_post_info, len, result, context)?;

let inner_weight = actual_post_info
.actual_weight
.map(|actual_weight| actual_weight.saturating_sub(post_info.actual_weight.unwrap()));

let Some(pre_dispatch_proof_size) = pre_dispatch_proof_size else {
// No information
Expand Down

0 comments on commit 30f8f4e

Please sign in to comment.