From 29de69e39d8c2b57d0f73d9bb40f02c90bba2c40 Mon Sep 17 00:00:00 2001 From: NikVolf Date: Wed, 6 Jul 2016 12:40:10 +0300 Subject: [PATCH] failing blockid test --- ethcore/src/tests/rpc.rs | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/ethcore/src/tests/rpc.rs b/ethcore/src/tests/rpc.rs index a25928cf8..123f70150 100644 --- a/ethcore/src/tests/rpc.rs +++ b/ethcore/src/tests/rpc.rs @@ -19,7 +19,7 @@ use nanoipc; use std::sync::Arc; use std::sync::atomic::{Ordering, AtomicBool}; -use client::{Client, ClientConfig, RemoteClient}; +use client::{Client, BlockChainClient, ClientConfig, RemoteClient, BlockID}; use tests::helpers::*; use devtools::*; use miner::Miner; @@ -55,3 +55,17 @@ fn can_handshake() { assert!(remote_client.handshake().is_ok()); }) } + +#[test] +fn can_query_block() { + crossbeam::scope(|scope| { + let stop_guard = StopGuard::new(); + let socket_path = "ipc:///tmp/parity-client-rpc-10.ipc"; + run_test_worker(scope, stop_guard.share(), socket_path); + let remote_client = nanoipc::init_client::>(socket_path).unwrap(); + + let non_existant_block = remote_client.block_header(BlockID::Number(999)); + + assert!(non_existant_block.is_none()); + }) +}