mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-14 01:41:09 +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:
@@ -25,6 +25,7 @@ use sp_runtime::traits::{
|
||||
StaticLookup, Member, LookupError, Zero, One, BlakeTwo256, Hash, Saturating, AtLeast32Bit
|
||||
};
|
||||
use frame_support::{Parameter, decl_module, decl_error, decl_event, decl_storage, ensure};
|
||||
use frame_support::weights::{Weight, SimpleDispatchInfo, WeighData};
|
||||
use frame_support::dispatch::DispatchResult;
|
||||
use frame_support::traits::{Currency, ReservableCurrency, Get, BalanceStatus::Reserved};
|
||||
use frame_support::storage::migration::take_storage_value;
|
||||
@@ -98,8 +99,10 @@ decl_module! {
|
||||
pub struct Module<T: Trait> for enum Call where origin: T::Origin, system = frame_system {
|
||||
fn deposit_event() = default;
|
||||
|
||||
fn on_initialize() {
|
||||
fn on_initialize() -> Weight {
|
||||
Self::migrations();
|
||||
|
||||
SimpleDispatchInfo::default().weigh_data(())
|
||||
}
|
||||
|
||||
/// Assign an previously unassigned index.
|
||||
|
||||
Reference in New Issue
Block a user