updated dependencies
This commit is contained in:
parent
e872cd1e63
commit
8bae8512fb
File diff suppressed because it is too large
Load Diff
|
@ -1,7 +1,7 @@
|
||||||
use std::net::SocketAddr;
|
use std::net::SocketAddr;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use rpc_apis::{self, ApiSet};
|
use rpc_apis::{self, ApiSet};
|
||||||
use ethcore_rpc::{Server, Error, start_http, MetaIoHandler, Compatibility, Remote};
|
use ethcore_rpc::{Server, start_http, MetaIoHandler, Compatibility, Remote};
|
||||||
use network::Network;
|
use network::Network;
|
||||||
use std::io;
|
use std::io;
|
||||||
use sync;
|
use sync;
|
||||||
|
@ -59,7 +59,7 @@ pub fn setup_http_rpc_server(
|
||||||
let server = setup_rpc_server(apis, deps);
|
let server = setup_rpc_server(apis, deps);
|
||||||
let start_result = start_http(url, cors_domains, allowed_hosts, server);
|
let start_result = start_http(url, cors_domains, allowed_hosts, server);
|
||||||
match start_result {
|
match start_result {
|
||||||
Err(Error::Io(ref err)) if err.kind() == io::ErrorKind::AddrInUse => {
|
Err(ref err) if err.kind() == io::ErrorKind::AddrInUse => {
|
||||||
Err(format!("RPC address {} is already in use, make sure that another instance of a Bitcoin node is not running or change the address using the --jsonrpc-port and --jsonrpc-interface options.", url))
|
Err(format!("RPC address {} is already in use, make sure that another instance of a Bitcoin node is not running or change the address using the --jsonrpc-port and --jsonrpc-interface options.", url))
|
||||||
},
|
},
|
||||||
Err(e) => Err(format!("RPC error: {:?}", e)),
|
Err(e) => Err(format!("RPC error: {:?}", e)),
|
||||||
|
|
|
@ -26,8 +26,8 @@ pub mod rpc_server;
|
||||||
|
|
||||||
pub use rustc_serialize::hex;
|
pub use rustc_serialize::hex;
|
||||||
|
|
||||||
pub use jsonrpc_core::{MetaIoHandler, Compatibility};
|
pub use jsonrpc_core::{MetaIoHandler, Compatibility, Error};
|
||||||
pub use jsonrpc_http_server::tokio_core::reactor::{Remote};
|
pub use jsonrpc_http_server::tokio_core::reactor::{Remote};
|
||||||
|
|
||||||
pub use jsonrpc_http_server::{Server, Error};
|
pub use jsonrpc_http_server::Server;
|
||||||
pub use rpc_server::start_http;
|
pub use rpc_server::start_http;
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
// TODO: panic handler
|
// TODO: panic handler
|
||||||
|
use std::io;
|
||||||
use std::net::SocketAddr;
|
use std::net::SocketAddr;
|
||||||
use jsonrpc_core;
|
use jsonrpc_core;
|
||||||
use jsonrpc_http_server::{self, ServerBuilder, Server, Error, Host};
|
use jsonrpc_http_server::{self, ServerBuilder, Server, Host};
|
||||||
|
|
||||||
/// Start http server asynchronously and returns result with `Server` handle on success or an error.
|
/// Start http server asynchronously and returns result with `Server` handle on success or an error.
|
||||||
pub fn start_http<M: jsonrpc_core::Metadata>(
|
pub fn start_http<M: jsonrpc_core::Metadata>(
|
||||||
|
@ -9,7 +10,7 @@ pub fn start_http<M: jsonrpc_core::Metadata>(
|
||||||
cors_domains: Option<Vec<String>>,
|
cors_domains: Option<Vec<String>>,
|
||||||
allowed_hosts: Option<Vec<String>>,
|
allowed_hosts: Option<Vec<String>>,
|
||||||
handler: jsonrpc_core::MetaIoHandler<M>,
|
handler: jsonrpc_core::MetaIoHandler<M>,
|
||||||
) -> Result<Server, Error> {
|
) -> Result<Server, io::Error> {
|
||||||
|
|
||||||
let cors_domains = cors_domains.map(|domains| {
|
let cors_domains = cors_domains.map(|domains| {
|
||||||
domains.into_iter()
|
domains.into_iter()
|
||||||
|
|
|
@ -7,7 +7,7 @@ authors = ["Nikolay Volf <nikvolf@gmail.com>"]
|
||||||
time = "0.1"
|
time = "0.1"
|
||||||
lazy_static = "0.2"
|
lazy_static = "0.2"
|
||||||
log = "0.3"
|
log = "0.3"
|
||||||
rayon = "0.7"
|
rayon = "0.8"
|
||||||
parking_lot = "0.4"
|
parking_lot = "0.4"
|
||||||
primitives = { path = "../primitives" }
|
primitives = { path = "../primitives" }
|
||||||
chain = { path = "../chain" }
|
chain = { path = "../chain" }
|
||||||
|
|
Loading…
Reference in New Issue