Asynchronous RPC support (#2017)
* Async RPC * Limiting number of transactions in queue * Fixing tests * Bumping serde and jsonrpc-core * serde updated to 0.8 * fixed failing tests * Bumping ipc server * Fixing API for endpoints * Experimenting with tests without --release mode
This commit is contained in:
committed by
Arkadiy Paronyan
parent
ca03cfa58a
commit
b4f3c4bd7a
@@ -12,7 +12,7 @@ ethcore-ipc-codegen = { path = "../ipc/codegen" }
|
||||
[dependencies]
|
||||
log = "0.3"
|
||||
json-tcp-server = { git = "https://github.com/ethcore/json-tcp-server" }
|
||||
jsonrpc-core = "2.1"
|
||||
jsonrpc-core = "3.0"
|
||||
mio = { git = "https://github.com/ethcore/mio", branch = "v0.5.x" }
|
||||
ethcore-util = { path = "../util" }
|
||||
ethcore-devtools = { path = "../devtools" }
|
||||
|
||||
@@ -108,15 +108,15 @@ impl Stratum {
|
||||
Ok(val) => val,
|
||||
Err(e) => {
|
||||
warn!(target: "stratum", "Invalid payload: '{}' ({:?})", &initial, e);
|
||||
try!(to_value(&[0u8; 0]))
|
||||
to_value(&[0u8; 0])
|
||||
},
|
||||
},
|
||||
None => try!(to_value(&[0u8; 0])),
|
||||
None => to_value(&[0u8; 0]),
|
||||
})
|
||||
}
|
||||
|
||||
fn authorize(&self, params: Params) -> std::result::Result<jsonrpc_core::Value, jsonrpc_core::Error> {
|
||||
from_params::<(String, String)>(params).and_then(|(worker_id, secret)|{
|
||||
from_params::<(String, String)>(params).map(|(worker_id, secret)|{
|
||||
if let Some(valid_secret) = self.secret {
|
||||
let hash = secret.sha3();
|
||||
if hash != valid_secret {
|
||||
|
||||
Reference in New Issue
Block a user