Weights to u64 + Balances Weights (#5446)

Co-Authored-By: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
This commit is contained in:
Shawn Tabrizi
2020-04-16 10:43:18 +02:00
committed by GitHub
parent 1c7525fd4b
commit 980b635c8d
82 changed files with 636 additions and 428 deletions
+4 -2
View File
@@ -43,6 +43,7 @@
//!
//! ```
//! use frame_support::{decl_module, dispatch};
//! use frame_support::weights::{SimpleDispatchInfo, MINIMUM_WEIGHT};
//! use frame_system::{self as system, ensure_signed};
//! use pallet_im_online::{self as im_online};
//!
@@ -50,7 +51,7 @@
//!
//! decl_module! {
//! pub struct Module<T: Trait> for enum Call where origin: T::Origin {
//! #[weight = frame_support::weights::SimpleDispatchInfo::default()]
//! #[weight = SimpleDispatchInfo::FixedNormal(MINIMUM_WEIGHT)]
//! pub fn is_online(origin, authority_index: u32) -> dispatch::DispatchResult {
//! let _sender = ensure_signed(origin)?;
//! let _is_online = <im_online::Module<T>>::is_online(authority_index);
@@ -94,6 +95,7 @@ use sp_staking::{
use frame_support::{
decl_module, decl_event, decl_storage, Parameter, debug, decl_error,
traits::Get,
weights::{SimpleDispatchInfo, MINIMUM_WEIGHT},
};
use frame_system::{self as system, ensure_none};
use frame_system::offchain::SubmitUnsignedTransaction;
@@ -316,7 +318,7 @@ decl_module! {
fn deposit_event() = default;
#[weight = frame_support::weights::SimpleDispatchInfo::default()]
#[weight = SimpleDispatchInfo::FixedNormal(MINIMUM_WEIGHT)]
fn heartbeat(
origin,
heartbeat: Heartbeat<T::BlockNumber>,
+1
View File
@@ -114,6 +114,7 @@ impl frame_system::Trait for Runtime {
type Event = ();
type BlockHashCount = BlockHashCount;
type MaximumBlockWeight = MaximumBlockWeight;
type DbWeight = ();
type MaximumBlockLength = MaximumBlockLength;
type AvailableBlockRatio = AvailableBlockRatio;
type Version = ();