mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-10 11:07:30 +00:00
RPC: Pending Extrinsics (#563)
* Expose extrinsics in pool. * Add test. * Use latest transaction pool. * Fix compilation.
This commit is contained in:
@@ -9,5 +9,6 @@ jsonrpc-http-server = { git = "https://github.com/paritytech/jsonrpc.git" }
|
||||
jsonrpc-pubsub = { git = "https://github.com/paritytech/jsonrpc.git" }
|
||||
jsonrpc-ws-server = { git = "https://github.com/paritytech/jsonrpc.git" }
|
||||
log = "0.3"
|
||||
serde = "1.0"
|
||||
substrate-rpc = { path = "../rpc", version = "0.1" }
|
||||
substrate-runtime-primitives = { path = "../runtime/primitives" }
|
||||
|
||||
@@ -24,6 +24,7 @@ extern crate jsonrpc_core as rpc;
|
||||
extern crate jsonrpc_http_server as http;
|
||||
extern crate jsonrpc_pubsub as pubsub;
|
||||
extern crate jsonrpc_ws_server as ws;
|
||||
extern crate serde;
|
||||
extern crate substrate_runtime_primitives;
|
||||
|
||||
#[macro_use]
|
||||
@@ -38,16 +39,17 @@ pub type HttpServer = http::Server;
|
||||
pub type WsServer = ws::Server;
|
||||
|
||||
/// Construct rpc `IoHandler`
|
||||
pub fn rpc_handler<Block: BlockT, S, C, A, Y>(
|
||||
pub fn rpc_handler<Block, PendingExtrinsics, S, C, A, Y>(
|
||||
state: S,
|
||||
chain: C,
|
||||
author: A,
|
||||
system: Y,
|
||||
) -> RpcHandler where
|
||||
Block: 'static,
|
||||
Block: BlockT + 'static,
|
||||
PendingExtrinsics: serde::Serialize + serde::de::DeserializeOwned + Send + Sync + 'static,
|
||||
S: apis::state::StateApi<Block::Hash, Metadata=Metadata>,
|
||||
C: apis::chain::ChainApi<Block::Hash, Block::Header, Metadata=Metadata>,
|
||||
A: apis::author::AuthorApi<Block::Hash, Block::Extrinsic, Metadata=Metadata>,
|
||||
A: apis::author::AuthorApi<Block::Hash, Block::Extrinsic, PendingExtrinsics, Metadata=Metadata>,
|
||||
Y: apis::system::SystemApi,
|
||||
{
|
||||
let mut io = pubsub::PubSubHandler::default();
|
||||
|
||||
Reference in New Issue
Block a user