mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 07:01:05 +00:00
on_initialize return weight consumed and default cost to default DispatchInfo instead of zero (#5382)
* frame update * doc * move offchain worker trait also * fix weigh merge * indentation * reorder for better git diff * comment * fix benchmark * remove test
This commit is contained in:
@@ -19,14 +19,15 @@
|
||||
use std::{collections::{HashSet, HashMap}, cell::RefCell};
|
||||
use sp_runtime::{Perbill, KeyTypeId};
|
||||
use sp_runtime::curve::PiecewiseLinear;
|
||||
use sp_runtime::traits::{IdentityLookup, Convert, OpaqueKeys, OnInitialize, OnFinalize, SaturatedConversion};
|
||||
use sp_runtime::traits::{IdentityLookup, Convert, OpaqueKeys, SaturatedConversion};
|
||||
use sp_runtime::testing::{Header, UintAuthorityId};
|
||||
use sp_staking::{SessionIndex, offence::{OffenceDetails, OnOffenceHandler}};
|
||||
use sp_core::{H256, crypto::key_types};
|
||||
use sp_io;
|
||||
use frame_support::{
|
||||
assert_ok, impl_outer_origin, parameter_types, StorageValue, StorageMap,
|
||||
StorageDoubleMap, IterableStorageMap, traits::{Currency, Get, FindAuthor}, weights::Weight,
|
||||
StorageDoubleMap, IterableStorageMap,
|
||||
traits::{Currency, Get, FindAuthor, OnFinalize, OnInitialize}, weights::Weight,
|
||||
};
|
||||
use crate::{
|
||||
EraIndex, GenesisConfig, Module, Trait, StakerStatus, ValidatorPrefs, RewardDestination,
|
||||
|
||||
@@ -18,11 +18,11 @@
|
||||
|
||||
use super::*;
|
||||
use mock::*;
|
||||
use sp_runtime::{assert_eq_error_rate, traits::{OnInitialize, BadOrigin}};
|
||||
use sp_runtime::{assert_eq_error_rate, traits::BadOrigin};
|
||||
use sp_staking::offence::OffenceDetails;
|
||||
use frame_support::{
|
||||
assert_ok, assert_noop,
|
||||
traits::{Currency, ReservableCurrency},
|
||||
traits::{Currency, ReservableCurrency, OnInitialize},
|
||||
StorageMap,
|
||||
};
|
||||
use pallet_balances::Error as BalancesError;
|
||||
|
||||
Reference in New Issue
Block a user