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

Set parachain-system inherent weights hint to max block weights #2233

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
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
7 changes: 5 additions & 2 deletions cumulus/pallets/parachain-system/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -526,8 +526,11 @@ pub mod pallet {
/// As a side effect, this function upgrades the current validation function
/// if the appropriate time has come.
#[pallet::call_index(0)]
#[pallet::weight((0, DispatchClass::Mandatory))]
// TODO: This weight should be corrected.
#[pallet::weight((<T as frame_system::Config>::BlockWeights::get().max_block, DispatchClass::Mandatory))]
// It makes no sense to have a weight hint for mandatory inherents, because like hooks they must be
// executed regardless of the weight they consume. We just need to be sure that:
// - The returned `actual_weight` field is always Some.
// - The weight hint is always greather than the returned `actual_weight`.
pub fn set_validation_data(
origin: OriginFor<T>,
data: ParachainInherentData,
Expand Down
Loading