v2.5.8-stable (#11041)
* add more tx tests (#11038) * Fix parallel transactions race-condition (#10995) * Add blake2_f precompile (#11017) * [trace] introduce trace failed to Ext (#11019) * Edit publish-onchain.sh to use https (#11016) * Fix deadlock in network-devp2p (#11013) * EIP 1108: Reduce alt_bn128 precompile gas costs (#11008) * xDai chain support and nodes list update (#10989) * EIP 2028: transaction gas lowered from 68 to 16 (#10987) * EIP-1344 Add CHAINID op-code (#10983) * manual publish jobs for releases, no changes for nightlies (#10977) * [blooms-db] Fix benchmarks (#10974) * Verify transaction against its block during import (#10954) * Better error message for rpc gas price errors (#10931) * tx-pool: accept local tx with higher gas price when pool full (#10901) * Fix fork choice (#10837) * Cleanup unused vm dependencies (#10787) * Fix compilation on recent nightlies (#10991)
This commit is contained in:
@@ -22,7 +22,7 @@ extern crate rlp;
|
||||
extern crate ethcore;
|
||||
extern crate parity_bytes as bytes;
|
||||
extern crate ethereum_types;
|
||||
extern crate jsonrpc_core as core;
|
||||
extern crate jsonrpc_core;
|
||||
extern crate jsonrpc_http_server as http;
|
||||
|
||||
pub mod error;
|
||||
@@ -32,8 +32,8 @@ use std::thread;
|
||||
use std::sync::{mpsc, Arc};
|
||||
use std::net::{SocketAddr, IpAddr};
|
||||
|
||||
use core::futures::future::{self, FutureResult};
|
||||
use core::futures::{self, Future};
|
||||
use jsonrpc_core::futures::future::{self, FutureResult};
|
||||
use jsonrpc_core::futures::{self, Future};
|
||||
use ethcore::client::BlockChainClient;
|
||||
use http::hyper::{self, server, Method, StatusCode, Body,
|
||||
header::{self, HeaderValue},
|
||||
@@ -51,19 +51,19 @@ pub struct IpfsHandler {
|
||||
/// Hostnames allowed in the `Host` request header
|
||||
allowed_hosts: Option<Vec<Host>>,
|
||||
/// Reference to the Blockchain Client
|
||||
client: Arc<BlockChainClient>,
|
||||
client: Arc<dyn BlockChainClient>,
|
||||
}
|
||||
|
||||
impl IpfsHandler {
|
||||
pub fn client(&self) -> &BlockChainClient {
|
||||
pub fn client(&self) -> &dyn BlockChainClient {
|
||||
&*self.client
|
||||
}
|
||||
|
||||
pub fn new(cors: DomainsValidation<AccessControlAllowOrigin>, hosts: DomainsValidation<Host>, client: Arc<BlockChainClient>) -> Self {
|
||||
pub fn new(cors: DomainsValidation<AccessControlAllowOrigin>, hosts: DomainsValidation<Host>, client: Arc<dyn BlockChainClient>) -> Self {
|
||||
IpfsHandler {
|
||||
cors_domains: cors.into(),
|
||||
allowed_hosts: hosts.into(),
|
||||
client: client,
|
||||
client,
|
||||
}
|
||||
}
|
||||
pub fn on_request(&self, req: hyper::Request<Body>) -> (Option<HeaderValue>, Out) {
|
||||
@@ -154,7 +154,7 @@ pub fn start_server(
|
||||
interface: String,
|
||||
cors: DomainsValidation<AccessControlAllowOrigin>,
|
||||
hosts: DomainsValidation<Host>,
|
||||
client: Arc<BlockChainClient>
|
||||
client: Arc<dyn BlockChainClient>
|
||||
) -> Result<Listening, ServerError> {
|
||||
|
||||
let ip: IpAddr = interface.parse().map_err(|_| ServerError::InvalidInterface)?;
|
||||
@@ -182,12 +182,12 @@ pub fn start_server(
|
||||
};
|
||||
|
||||
let server = server_bldr
|
||||
.serve(new_service)
|
||||
.map_err(|_| ())
|
||||
.select(shutdown_signal.map_err(|_| ()))
|
||||
.then(|_| Ok(()));
|
||||
.serve(new_service)
|
||||
.map_err(|_| ())
|
||||
.select(shutdown_signal.map_err(|_| ()))
|
||||
.then(|_| Ok(()));
|
||||
|
||||
hyper::rt::run(server);
|
||||
hyper::rt::run(server);
|
||||
send(Ok(()));
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user