mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 17:31:05 +00:00
Custom RPC implementation for node. (#3109)
* Allow RPCs to be customized. * Implement node-rpc extensions. * Working on a test. * Add node-testing crate. * Fix genesis test config * Fix nonce lookups. * Clean up. * Fix expected block type. * Make the RPC extension function optional. * Fix service doc test. * Bump jsonrpc. * Bump client version. * Update Cargo.lock * Update jsonrpc. * Fix build. * Remove unused imports. * Fix signed extra. * Post merge clean up. * Fix tests. * Patch hashmap-core. * Fix build. * Fix build. * Remove hashmap_core patches.
This commit is contained in:
committed by
Gavin Wood
parent
95abffc8e4
commit
56296386ab
@@ -15,19 +15,23 @@
|
||||
// along with Substrate. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Substrate RPC interfaces.
|
||||
//!
|
||||
//! A collection of RPC methods and subscriptions supported by all substrate clients.
|
||||
|
||||
#![warn(missing_docs)]
|
||||
|
||||
mod errors;
|
||||
mod helpers;
|
||||
mod metadata;
|
||||
mod subscriptions;
|
||||
|
||||
use jsonrpc_core as rpc;
|
||||
|
||||
pub use metadata::Metadata;
|
||||
pub use rpc::IoHandlerExtension as RpcExtension;
|
||||
pub use subscriptions::Subscriptions;
|
||||
|
||||
pub mod author;
|
||||
pub mod chain;
|
||||
pub mod metadata;
|
||||
pub mod state;
|
||||
pub mod system;
|
||||
|
||||
use jsonrpc_core as rpc;
|
||||
|
||||
@@ -52,3 +52,9 @@ impl Metadata {
|
||||
(rx, Self::new(tx))
|
||||
}
|
||||
}
|
||||
|
||||
impl From<mpsc::Sender<String>> for Metadata {
|
||||
fn from(sender: mpsc::Sender<String>) -> Self {
|
||||
Self::new(sender)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,8 +29,8 @@ use network;
|
||||
use sr_primitives::traits::{self, Header as HeaderT};
|
||||
|
||||
use self::error::Result;
|
||||
pub use self::helpers::{Properties, SystemInfo, Health, PeerInfo};
|
||||
|
||||
pub use self::helpers::{Properties, SystemInfo, Health, PeerInfo};
|
||||
pub use self::gen_client::Client as SystemClient;
|
||||
|
||||
/// Substrate system RPC API
|
||||
|
||||
Reference in New Issue
Block a user