Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix reversed error message in DispatchInfo #7170

Merged
merged 4 commits into from
Jan 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions prdoc/pr_7170.prdoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
title: Fix reversed error message in DispatchInfo
doc:
- audience: Runtime Dev
description: "Fix error message in `DispatchInfo` where post-dispatch and pre-dispatch\
\ weight was reversed.\r\n"
crates:
- name: frame-support
bump: patch
6 changes: 2 additions & 4 deletions substrate/frame/support/src/dispatch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -315,10 +315,8 @@ impl PostDispatchInfo {
"Post dispatch weight is greater than pre dispatch weight. \
Pre dispatch weight may underestimating the actual weight. \
Greater post dispatch weight components are ignored.
Pre dispatch weight: {:?},
Post dispatch weight: {:?}",
actual_weight,
info_total_weight,
Pre dispatch weight: {info_total_weight:?},
Post dispatch weight: {actual_weight:?}",
);
}
actual_weight.min(info.total_weight())
Expand Down
Loading