Update to latest Substrate master (#703)

* Update to latest Substrate master

* Fix tests
This commit is contained in:
Bastian Köcher
2019-12-19 21:51:44 +01:00
committed by GitHub
parent f0c66f9b99
commit 96f24d4fe7
8 changed files with 218 additions and 225 deletions
+2 -2
View File
@@ -21,7 +21,7 @@
use rstd::prelude::*;
use codec::{Encode, Decode};
use frame_support::{decl_storage, decl_module, ensure, dispatch::Result, traits::Get};
use frame_support::{decl_storage, decl_module, ensure, dispatch::DispatchResult, traits::Get};
use primitives::{Hash, parachain::{AttestedCandidate, CandidateReceipt, Id as ParaId}};
use sp_runtime::RuntimeDebug;
@@ -110,7 +110,7 @@ decl_module! {
/// Parachain-attestations module.
pub struct Module<T: Trait> for enum Call where origin: <T as system::Trait>::Origin {
/// Provide candidate receipts for parachains, in ascending order by id.
fn more_attestations(origin, _more: MoreAttestations) -> Result {
fn more_attestations(origin, _more: MoreAttestations) -> DispatchResult {
ensure_none(origin)?;
ensure!(!<DidUpdate>::exists(), "More attestations can be added only once in a block.");
<DidUpdate>::put(true);