mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-14 22:41:06 +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:
@@ -1011,10 +1011,8 @@ pub mod pallet {
|
||||
// unlikely to ever return an error: if phase is signed, snapshot will exist.
|
||||
let size = Self::snapshot_metadata().ok_or(Error::<T>::MissingSnapshotMetadata)?;
|
||||
|
||||
// TODO: account for proof size weight
|
||||
ensure!(
|
||||
Self::solution_weight_of(&raw_solution, size).ref_time() <
|
||||
T::SignedMaxWeight::get().ref_time(),
|
||||
Self::solution_weight_of(&raw_solution, size).all_lt(T::SignedMaxWeight::get()),
|
||||
Error::<T>::SignedTooMuchWeight,
|
||||
);
|
||||
|
||||
@@ -2342,9 +2340,8 @@ mod tests {
|
||||
};
|
||||
|
||||
let mut active = 1;
|
||||
// TODO: account for proof size weight
|
||||
while weight_with(active).ref_time() <=
|
||||
<Runtime as frame_system::Config>::BlockWeights::get().max_block.ref_time() ||
|
||||
while weight_with(active)
|
||||
.all_lte(<Runtime as frame_system::Config>::BlockWeights::get().max_block) ||
|
||||
active == all_voters
|
||||
{
|
||||
active += 1;
|
||||
|
||||
Reference in New Issue
Block a user