mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 13:27:57 +00:00
Fix offchain election to respect the weight (#7215)
* Mockup * Fix offchain election to respect the weight * Fix builds a bit * Update frame/staking/src/offchain_election.rs Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com> * Update frame/staking/src/offchain_election.rs Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com> * Make it build, binary search * Fix a number of grumbles * one more fix. * remove unwrap. * better alg. * Better alg again. * Final fixes * Fix * Rollback to normal * Final touches. * Better tests. * Update frame/staking/src/lib.rs Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com> * Proper maxExtWeight * Final fix * Final fix for the find_voter Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com> Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com>
This commit is contained in:
@@ -182,7 +182,7 @@ impl<T: Trait + Send + Sync> CheckWeight<T> where
|
||||
/// Do the pre-dispatch checks. This can be applied to both signed and unsigned.
|
||||
///
|
||||
/// It checks and notes the new weight and length.
|
||||
fn do_pre_dispatch(
|
||||
pub fn do_pre_dispatch(
|
||||
info: &DispatchInfoOf<T::Call>,
|
||||
len: usize,
|
||||
) -> Result<(), TransactionValidityError> {
|
||||
@@ -198,7 +198,7 @@ impl<T: Trait + Send + Sync> CheckWeight<T> where
|
||||
/// Do the validate checks. This can be applied to both signed and unsigned.
|
||||
///
|
||||
/// It only checks that the block weight and length limit will not exceed.
|
||||
fn do_validate(
|
||||
pub fn do_validate(
|
||||
info: &DispatchInfoOf<T::Call>,
|
||||
len: usize,
|
||||
) -> TransactionValidity {
|
||||
|
||||
Reference in New Issue
Block a user