From e95756514404d425659f3fbeccaceb93808bc2a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Drwi=C4=99ga?= Date: Sat, 18 Jun 2016 12:33:45 +0200 Subject: [PATCH] Disabling ethcore_set* APIs by default (+ Status page update) (#1315) * More meaningful errors when sending transaction * Fixing returned value * Consolidating all RPC error codes * Fixed loosing peers on incoming connections. (#1293) * Deactivate peer if it has no new data * Fixed node table timer registration * Fixed handshake timeout expiration * Extra trace * Fixed session count calculation * Only deactivate incapable peers in ChainHead state * Timer registration is not needed * x64 path * firewall rules * Fix read-ahead bug. Re-ahead 8 bytes rather than 3 to ensure large blocks import fine. * Refactor to use a const. * Update README.md * Gas price statistics. (#1291) * Gas price statistics. Affects eth_gasPrice. Added ethcore_gasPriceStatistics. Closes #1265 * Fix a bug in eth_gasPrice * Fix tests. * Revert minor alteration. * Tests for gas_price_statistics. - Tests; - Additional infrastructure for generating test blocks with transactions. * Key load avoid warning (#1303) * avoid warning with key * fix intendations * more intendation fix * ok() instead of expect() * Appveyor config for windows build+installer (#1302) * appveyor * proper dist name * quote * win-build config * proper build section * tests in release * plugin dir * cache binaries * quotes * escaped quotes * forces user dir * fixes * syntax * proper cahce dir * quotes? * root nsis instead of bin * submodules init * artifact path fix * no submodule * raw link here * another way to force cargo cache * include vc++ 2015 redist * fix name of the dist * ETHCORE -> Ethcore * Disabling ethcore_set* APIs (+ Status page) --- Cargo.lock | 2 +- parity/rpc_apis.rs | 4 ++-- sync/src/chain.rs | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b95500540..d6ac021ea 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -936,7 +936,7 @@ dependencies = [ [[package]] name = "parity-dapps-status" version = "0.5.0" -source = "git+https://github.com/ethcore/parity-dapps-status-rs.git#53e159f52013be5d2e8ba7eca35f605ad6e3bfa9" +source = "git+https://github.com/ethcore/parity-dapps-status-rs.git#0cdd3512004e403aff7da3b8c16ba0bf5d6c911c" dependencies = [ "parity-dapps 0.3.0 (git+https://github.com/ethcore/parity-dapps-rs.git)", ] diff --git a/parity/rpc_apis.rs b/parity/rpc_apis.rs index f4b2d067f..8f8c7b27e 100644 --- a/parity/rpc_apis.rs +++ b/parity/rpc_apis.rs @@ -122,10 +122,10 @@ fn list_apis(apis: ApiSet) -> Vec { match apis { ApiSet::List(apis) => apis, ApiSet::UnsafeContext => { - vec![Api::Web3, Api::Net, Api::Eth, Api::Personal, Api::Ethcore, Api::EthcoreSet, Api::Traces, Api::Rpc] + vec![Api::Web3, Api::Net, Api::Eth, Api::Personal, Api::Ethcore, Api::Traces, Api::Rpc] }, _ => { - vec![Api::Web3, Api::Net, Api::Eth, Api::Personal, Api::Signer, Api::Ethcore, Api::EthcoreSet, Api::Traces, Api::Rpc] + vec![Api::Web3, Api::Net, Api::Eth, Api::Personal, Api::Signer, Api::Ethcore, Api::Traces, Api::Rpc] }, } } diff --git a/sync/src/chain.rs b/sync/src/chain.rs index 25f1eb6a3..db2ec339e 100644 --- a/sync/src/chain.rs +++ b/sync/src/chain.rs @@ -458,12 +458,12 @@ impl ChainSync { // Disable the peer for this syncing round if it gives invalid chain if !valid_response { trace!(target: "sync", "{} Deactivated for invalid headers response", peer_id); - self.deactivate_peer(io, peer_id); + self.deactivate_peer(io, peer_id); } if headers.is_empty() { // Peer does not have any new subchain heads, deactivate it nd try with another trace!(target: "sync", "{} Deactivated for no data", peer_id); - self.deactivate_peer(io, peer_id); + self.deactivate_peer(io, peer_id); } match self.state { SyncState::ChainHead => {