mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-01 02:11:01 +00:00
Transaction queue integration + submission RPC (#99)
* Implement transaction queue RPC. * whitespace * Support without_std env in environmental! (#110) * Make environmental crate support without_std env. * Small doc fixes. * Remove dead code.
This commit is contained in:
@@ -26,6 +26,7 @@ extern crate substrate_runtime_io as runtime_io;
|
||||
extern crate substrate_state_machine as state_machine;
|
||||
extern crate substrate_client as client;
|
||||
extern crate substrate_primitives as primitives;
|
||||
extern crate substrate_rpc;
|
||||
extern crate substrate_rpc_servers as rpc;
|
||||
extern crate demo_primitives;
|
||||
extern crate demo_executor;
|
||||
@@ -49,6 +50,13 @@ use demo_runtime::{GenesisConfig, ConsensusConfig, CouncilConfig, DemocracyConfi
|
||||
SessionConfig, StakingConfig, BuildExternalities};
|
||||
use client::genesis;
|
||||
|
||||
struct DummyPool;
|
||||
impl substrate_rpc::author::AuthorApi for DummyPool {
|
||||
fn submit_extrinsic(&self, _: primitives::block::Extrinsic) -> substrate_rpc::author::error::Result<()> {
|
||||
Err(substrate_rpc::author::error::ErrorKind::Unimplemented.into())
|
||||
}
|
||||
}
|
||||
|
||||
/// Parse command line arguments and start the node.
|
||||
///
|
||||
/// IANA unassigned port ranges that we could use:
|
||||
@@ -126,7 +134,7 @@ pub fn run<I, T>(args: I) -> error::Result<()> where
|
||||
let client = Arc::new(client::new_in_mem(executor, prepare_genesis)?);
|
||||
|
||||
let address = "127.0.0.1:9933".parse().unwrap();
|
||||
let handler = rpc::rpc_handler(client);
|
||||
let handler = rpc::rpc_handler(client, DummyPool);
|
||||
let server = rpc::start_http(&address, handler)?;
|
||||
|
||||
if let Some(_) = matches.subcommand_matches("validator") {
|
||||
|
||||
Reference in New Issue
Block a user