mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-14 02:51:08 +00:00
Weights to u64 + Balances Weights (#5446)
Co-Authored-By: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
This commit is contained in:
@@ -27,7 +27,7 @@ use frame_support::traits::{FindAuthor, VerifySeal, Get};
|
||||
use codec::{Encode, Decode};
|
||||
use frame_system::ensure_none;
|
||||
use sp_runtime::traits::{Header as HeaderT, One, Zero};
|
||||
use frame_support::weights::{Weight, SimpleDispatchInfo, WeighData};
|
||||
use frame_support::weights::{Weight, MINIMUM_WEIGHT, SimpleDispatchInfo};
|
||||
use sp_inherents::{InherentIdentifier, ProvideInherent, InherentData};
|
||||
use sp_authorship::{INHERENT_IDENTIFIER, UnclesInherentData, InherentError};
|
||||
|
||||
@@ -197,7 +197,7 @@ decl_module! {
|
||||
|
||||
T::EventHandler::note_author(Self::author());
|
||||
|
||||
SimpleDispatchInfo::default().weigh_data(())
|
||||
MINIMUM_WEIGHT
|
||||
}
|
||||
|
||||
fn on_finalize() {
|
||||
@@ -207,7 +207,7 @@ decl_module! {
|
||||
}
|
||||
|
||||
/// Provide a set of uncles.
|
||||
#[weight = SimpleDispatchInfo::FixedMandatory(10_000)]
|
||||
#[weight = SimpleDispatchInfo::FixedMandatory(MINIMUM_WEIGHT)]
|
||||
fn set_uncles(origin, new_uncles: Vec<T::Header>) -> dispatch::DispatchResult {
|
||||
ensure_none(origin)?;
|
||||
ensure!(new_uncles.len() <= MAX_UNCLES, Error::<T>::TooManyUncles);
|
||||
@@ -429,6 +429,7 @@ mod tests {
|
||||
type Event = ();
|
||||
type BlockHashCount = BlockHashCount;
|
||||
type MaximumBlockWeight = MaximumBlockWeight;
|
||||
type DbWeight = ();
|
||||
type AvailableBlockRatio = AvailableBlockRatio;
|
||||
type MaximumBlockLength = MaximumBlockLength;
|
||||
type Version = ();
|
||||
|
||||
Reference in New Issue
Block a user