mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-09 02:27:21 +00:00
chainHead: Sync events with spec (#14654)
* chainHead/events: Remove network config Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * chainHead/events: Add events for operations Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * chainHead/tests: Test chainHead events serialize/deserialize Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * chainHead/events: Remove generics from the storage event Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * chainHead/events: Rename kebab-case to camelCase Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * chainHead/events: Add methodResponse object Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> --------- Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
This commit is contained in:
@@ -19,7 +19,7 @@
|
||||
#![allow(non_snake_case)]
|
||||
|
||||
//! API trait of the chain head.
|
||||
use crate::chain_head::event::{ChainHeadEvent, FollowEvent, NetworkConfig, StorageQuery};
|
||||
use crate::chain_head::event::{ChainHeadEvent, FollowEvent, StorageQuery};
|
||||
use jsonrpsee::{core::RpcResult, proc_macros::rpc};
|
||||
|
||||
#[rpc(client, server)]
|
||||
@@ -52,12 +52,7 @@ pub trait ChainHeadApi<Hash> {
|
||||
unsubscribe = "chainHead_unstable_stopBody",
|
||||
item = ChainHeadEvent<String>,
|
||||
)]
|
||||
fn chain_head_unstable_body(
|
||||
&self,
|
||||
follow_subscription: String,
|
||||
hash: Hash,
|
||||
network_config: Option<NetworkConfig>,
|
||||
);
|
||||
fn chain_head_unstable_body(&self, follow_subscription: String, hash: Hash);
|
||||
|
||||
/// Retrieves the header of a pinned block.
|
||||
///
|
||||
@@ -102,7 +97,6 @@ pub trait ChainHeadApi<Hash> {
|
||||
hash: Hash,
|
||||
items: Vec<StorageQuery<String>>,
|
||||
child_trie: Option<String>,
|
||||
network_config: Option<NetworkConfig>,
|
||||
);
|
||||
|
||||
/// Call into the Runtime API at a specified block's state.
|
||||
@@ -121,7 +115,6 @@ pub trait ChainHeadApi<Hash> {
|
||||
hash: Hash,
|
||||
function: String,
|
||||
call_parameters: String,
|
||||
network_config: Option<NetworkConfig>,
|
||||
);
|
||||
|
||||
/// Unpin a block reported by the `follow` method.
|
||||
|
||||
Reference in New Issue
Block a user