-
Notifications
You must be signed in to change notification settings - Fork 239
Fix/weights mismatch #2049
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/weights mismatch #2049
Conversation
let pays = if dispatch_infos.clone().any(|di| di.pays_fee == Pays::No) { | ||
Pays::No | ||
} else { | ||
Pays::Yes | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This part matters to have Pays::No propagated
// AccountData for inner call origin accountdata. | ||
.saturating_add(T::DbWeight::get().reads_writes(1, 1)) | ||
.saturating_add(di.call_weight), | ||
di.class, di.pays_fee) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here we use the pays_fee from the inner call, that way if it's Pays::No, this is propagated to the proxy call
Description
Fix the weights mismatch from pre/post DispatchInfo in the logs.
Utility/Proxy pallets are upgraded.
Issue with non accounted weight is fixed while still allowing Pays::No call to passthrough (here and here)
Related Issue(s)
Type of Change
Breaking Change
If this PR introduces a breaking change, please provide a detailed description of the impact and the migration path for existing applications.
Checklist
cargo fmt
andcargo clippy
to ensure my code is formatted and linted correctlyScreenshots (if applicable)
Please include any relevant screenshots or GIFs that demonstrate the changes made.
Additional Notes
Please provide any additional information or context that may be helpful for reviewers.