From dc59431474da59a44cfabedf298646c4add5514e Mon Sep 17 00:00:00 2001 From: Robert Habermeier Date: Sat, 3 Nov 2018 16:45:18 +0100 Subject: [PATCH] API id module --- substrate/core/finality-grandpa/primitives/src/lib.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/substrate/core/finality-grandpa/primitives/src/lib.rs b/substrate/core/finality-grandpa/primitives/src/lib.rs index 649d424e6b..21fd9c6e3b 100644 --- a/substrate/core/finality-grandpa/primitives/src/lib.rs +++ b/substrate/core/finality-grandpa/primitives/src/lib.rs @@ -46,6 +46,14 @@ pub const PENDING_CHANGE_CALL: &str = "grandpa_pending_change"; /// WASM function call to get current GRANDPA authorities. pub const AUTHORITIES_CALL: &str = "grandpa_authorities"; +/// The ApiIds for GRANDPA API. +pub mod id { + use sr_api::ApiId; + + /// ApiId for the GrandpaApi trait. + pub const GRANDPA_API: ApiId = *b"fgrandpa"; +} + decl_apis! { /// APIs for integrating the GRANDPA finality gadget into runtimes. /// @@ -55,7 +63,7 @@ decl_apis! { /// applied in the runtime after those N blocks have passed. /// /// The consensus protocol will coordinate the handoff externally. - pub trait Api { + pub trait GrandpaApi { /// Check a digest for pending changes. /// Return `None` if there are no pending changes. ///