diff --git a/prdoc/pr_7170.prdoc b/prdoc/pr_7170.prdoc new file mode 100644 index 0000000000000000000000000000000000000000..fae908f7407d65096910c06ea765c72fb071620d --- /dev/null +++ b/prdoc/pr_7170.prdoc @@ -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 diff --git a/substrate/frame/support/src/dispatch.rs b/substrate/frame/support/src/dispatch.rs index 990996830030ce1a12ea165ffbe77052661e6edc..14bc2667def179cc0d403287acca811939824bbe 100644 --- a/substrate/frame/support/src/dispatch.rs +++ b/substrate/frame/support/src/dispatch.rs @@ -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())