mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-29 12:37:57 +00:00
Weights to u64 + Balances Weights (#5446)
Co-Authored-By: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
This commit is contained in:
@@ -23,6 +23,7 @@ use sp_runtime::traits::{One, Zero, SaturatedConversion};
|
||||
use sp_std::{prelude::*, result, cmp, vec};
|
||||
use frame_support::{decl_module, decl_storage, decl_error, ensure};
|
||||
use frame_support::traits::Get;
|
||||
use frame_support::weights::{SimpleDispatchInfo, MINIMUM_WEIGHT};
|
||||
use frame_system::{ensure_none, Trait as SystemTrait};
|
||||
use sp_finality_tracker::{INHERENT_IDENTIFIER, FinalizedInherentData};
|
||||
|
||||
@@ -76,7 +77,7 @@ decl_module! {
|
||||
|
||||
/// Hint that the author of this block thinks the best finalized
|
||||
/// block is the given number.
|
||||
#[weight = frame_support::weights::SimpleDispatchInfo::FixedMandatory(10_000)]
|
||||
#[weight = SimpleDispatchInfo::FixedMandatory(MINIMUM_WEIGHT)]
|
||||
fn final_hint(origin, #[compact] hint: T::BlockNumber) {
|
||||
ensure_none(origin)?;
|
||||
ensure!(!<Self as Store>::Update::exists(), Error::<T>::AlreadyUpdated);
|
||||
@@ -260,6 +261,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