Companion PR for substrate#5446 (Update Weights to u64) (#994)

This commit is contained in:
Shawn Tabrizi
2020-04-16 11:31:41 +02:00
committed by GitHub
parent fa81636b1c
commit 58f992fa33
16 changed files with 466 additions and 438 deletions
+5 -2
View File
@@ -22,7 +22,10 @@
use sp_std::prelude::*;
use codec::{Encode, Decode};
use frame_support::{
decl_storage, decl_module, decl_error, ensure, dispatch::DispatchResult, traits::Get
decl_storage, decl_module, decl_error, ensure,
dispatch::DispatchResult,
traits::Get,
weights::{MINIMUM_WEIGHT, SimpleDispatchInfo},
};
use primitives::{Hash, parachain::{AttestedCandidate, AbridgedCandidateReceipt, Id as ParaId}};
@@ -131,7 +134,7 @@ decl_module! {
type Error = Error<T>;
/// Provide candidate receipts for parachains, in ascending order by id.
#[weight = frame_support::weights::SimpleDispatchInfo::FixedMandatory(10_000)]
#[weight = SimpleDispatchInfo::FixedMandatory(MINIMUM_WEIGHT)]
fn more_attestations(origin, _more: MoreAttestations) -> DispatchResult {
ensure_none(origin)?;
ensure!(!DidUpdate::exists(), Error::<T>::TooManyAttestations);