mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 07:31:02 +00:00
Make runtime api calls native when possible (#1302)
* Add simple benchmark for the runtime api * Make the executor support native calls * Some documentation * Hide behind `feature = "std"` * Rework the native calls * Make all tests compile again * Make every parameter using the Block serialized/deserialized in the native call * Forward `UnwindSafe` requirement * Remove debug stuff * Add some documentation * Fixes warnings * Fixes errors after master rebase * Fixes compilation after master rebase * Fixes compilation after rebase
This commit is contained in:
@@ -53,14 +53,6 @@ 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 client::runtime_api::ApiId;
|
||||
|
||||
/// ApiId for the GrandpaApi trait.
|
||||
pub const GRANDPA_API: ApiId = *b"fgrandpa";
|
||||
}
|
||||
|
||||
/// Well-known storage keys for GRANDPA.
|
||||
pub mod well_known_keys {
|
||||
/// The key for the authorities and weights vector in storage.
|
||||
@@ -92,7 +84,7 @@ decl_runtime_apis! {
|
||||
/// This should be a pure function: i.e. as long as the runtime can interpret
|
||||
/// the digest type it should return the same result regardless of the current
|
||||
/// state.
|
||||
fn grandpa_pending_change(digest: DigestFor<Block>)
|
||||
fn grandpa_pending_change(digest: &DigestFor<Block>)
|
||||
-> Option<ScheduledChange<NumberFor<Block>>>;
|
||||
|
||||
/// Get the current GRANDPA authorities and weights. This should not change except
|
||||
|
||||
Reference in New Issue
Block a user