mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 04:41:02 +00:00
Properly set the max proof size weight on defaults and tests (#12383)
* Properly set the max proof size weight on defaults and tests * cargo fmt * Set proper max proof size for contracts pallet tests * Properly set max proof size for node * Properly set max proof size for frame system mock * Update test expectations * Update test expectations * Properly set max proof size for balances mock * Update test expectations * Update test expectations * Properly set max proof size for democracy mock * Properly set max proof size for scheduler mock * Properly set max proof size for fast unstake mock * Properly set max proof size for tx payment mock * Properly set max proof size for elections phragmen mock * Properly set max proof size for node template
This commit is contained in:
@@ -459,8 +459,7 @@ where
|
||||
let max_weight = <System::BlockWeights as frame_support::traits::Get<_>>::get().max_block;
|
||||
let remaining_weight = max_weight.saturating_sub(weight.total());
|
||||
|
||||
// TODO: account for proof size weight
|
||||
if remaining_weight.ref_time() > 0 {
|
||||
if remaining_weight.all_gt(Weight::zero()) {
|
||||
let used_weight = <AllPalletsWithSystem as OnIdle<System::BlockNumber>>::on_idle(
|
||||
block_number,
|
||||
remaining_weight,
|
||||
@@ -768,7 +767,7 @@ mod tests {
|
||||
frame_system::limits::BlockWeights::builder()
|
||||
.base_block(Weight::from_ref_time(10))
|
||||
.for_class(DispatchClass::all(), |weights| weights.base_extrinsic = Weight::from_ref_time(5))
|
||||
.for_class(DispatchClass::non_mandatory(), |weights| weights.max_total = Weight::from_ref_time(1024).into())
|
||||
.for_class(DispatchClass::non_mandatory(), |weights| weights.max_total = Weight::from_ref_time(1024).set_proof_size(u64::MAX).into())
|
||||
.build_or_panic();
|
||||
pub const DbWeight: RuntimeDbWeight = RuntimeDbWeight {
|
||||
read: 10,
|
||||
|
||||
Reference in New Issue
Block a user