fail with InsufficientDispatchWeight if dispatch_weight doesn't cover weight of all bundled messages (#2018)

This commit is contained in:
Svyatoslav Nikolsky
2023-04-07 09:55:06 +03:00
committed by Bastian Köcher
parent 98542685b1
commit f659ebed7a
5 changed files with 67 additions and 40 deletions
+10
View File
@@ -160,6 +160,16 @@ pub mod pallet {
///
/// If successful in verification, it will write the target header to the underlying storage
/// pallet.
///
/// The call fails if:
///
/// - the pallet is halted;
///
/// - the pallet knows better header than the `finality_target`;
///
/// - verification is not optimized or invalid;
///
/// - header contains forced authorities set change or change with non-zero delay.
#[pallet::call_index(0)]
#[pallet::weight(<T::WeightInfo as WeightInfo>::submit_finality_proof(
justification.commit.precommits.len().saturated_into(),