serde is no longer util dependency (#1534)
* removed old json-tests * simplify folds in triehash.rs * removed unused json_aid * removed unused squeeze.rs * json branching tests for trie * removing todos from util * separated UsingQueue and Table * further cleanup, removing unused code * serde serialization of hash moved to rpc module * uint wrapper for rpc in progress * serialization of uint moved to rpc module * updated eth-secp256k1 * updated igd, serde is no longer dependency of util * loading trie consensus tests * renamed aliases in rpc imports
This commit is contained in:
@@ -15,15 +15,14 @@
|
||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/// Ethcore-specific rpc interface for operations altering the settings.
|
||||
use util::{U256, Address};
|
||||
use util::network::{NetworkService, NonReservedPeerMode};
|
||||
use std::sync::{Arc, Weak};
|
||||
use jsonrpc_core::*;
|
||||
use ethcore::miner::MinerService;
|
||||
use ethcore::client::MiningBlockChainClient;
|
||||
use ethcore::service::SyncMessage;
|
||||
use util::network::{NetworkService, NonReservedPeerMode};
|
||||
use v1::traits::EthcoreSet;
|
||||
use v1::types::Bytes;
|
||||
use v1::types::{Bytes, H160, U256};
|
||||
|
||||
/// Ethcore-specific rpc interface for operations altering the settings.
|
||||
pub struct EthcoreSetClient<C, M> where
|
||||
@@ -61,7 +60,7 @@ impl<C, M> EthcoreSet for EthcoreSetClient<C, M> where
|
||||
fn set_min_gas_price(&self, params: Params) -> Result<Value, Error> {
|
||||
try!(self.active());
|
||||
from_params::<(U256,)>(params).and_then(|(gas_price,)| {
|
||||
take_weak!(self.miner).set_minimal_gas_price(gas_price);
|
||||
take_weak!(self.miner).set_minimal_gas_price(gas_price.into());
|
||||
to_value(&true)
|
||||
})
|
||||
}
|
||||
@@ -69,7 +68,7 @@ impl<C, M> EthcoreSet for EthcoreSetClient<C, M> where
|
||||
fn set_gas_floor_target(&self, params: Params) -> Result<Value, Error> {
|
||||
try!(self.active());
|
||||
from_params::<(U256,)>(params).and_then(|(target,)| {
|
||||
take_weak!(self.miner).set_gas_floor_target(target);
|
||||
take_weak!(self.miner).set_gas_floor_target(target.into());
|
||||
to_value(&true)
|
||||
})
|
||||
}
|
||||
@@ -77,7 +76,7 @@ impl<C, M> EthcoreSet for EthcoreSetClient<C, M> where
|
||||
fn set_gas_ceil_target(&self, params: Params) -> Result<Value, Error> {
|
||||
try!(self.active());
|
||||
from_params::<(U256,)>(params).and_then(|(target,)| {
|
||||
take_weak!(self.miner).set_gas_ceil_target(target);
|
||||
take_weak!(self.miner).set_gas_ceil_target(target.into());
|
||||
to_value(&true)
|
||||
})
|
||||
}
|
||||
@@ -92,8 +91,8 @@ impl<C, M> EthcoreSet for EthcoreSetClient<C, M> where
|
||||
|
||||
fn set_author(&self, params: Params) -> Result<Value, Error> {
|
||||
try!(self.active());
|
||||
from_params::<(Address,)>(params).and_then(|(author,)| {
|
||||
take_weak!(self.miner).set_author(author);
|
||||
from_params::<(H160,)>(params).and_then(|(author,)| {
|
||||
take_weak!(self.miner).set_author(author.into());
|
||||
to_value(&true)
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user