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:
Gav Wood
2018-04-09 16:28:06 +02:00
committed by GitHub
parent f72e9e7e13
commit 3024a839f2
19 changed files with 209 additions and 3 deletions
+9 -1
View File
@@ -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") {