finish purging x! from parity, remove x! and xx! macros

This commit is contained in:
Robert Habermeier
2016-05-31 17:25:25 +02:00
parent 3abaeadcf3
commit c62bfcddef
5 changed files with 9 additions and 23 deletions

View File

@@ -150,10 +150,10 @@ pub trait MinerService : Send + Sync {
fn last_nonce(&self, address: &Address) -> Option<U256>;
/// Suggested gas price.
fn sensible_gas_price(&self) -> U256 { x!(20000000000u64) }
fn sensible_gas_price(&self) -> U256 { 20000000000u64.into() }
/// Suggested gas limit.
fn sensible_gas_limit(&self) -> U256 { x!(21000) }
fn sensible_gas_limit(&self) -> U256 { 21000.into() }
/// Latest account balance in pending state.
fn balance(&self, chain: &BlockChainClient, address: &Address) -> U256;

View File

@@ -137,7 +137,7 @@ impl Miner {
Err(Error::Execution(ExecutionError::BlockGasLimitReached { gas_limit, gas_used, .. })) => {
trace!(target: "miner", "Skipping adding transaction to block because of gas limit: {:?}", hash);
// Exit early if gas left is smaller then min_tx_gas
let min_tx_gas: U256 = x!(21000); // TODO: figure this out properly.
let min_tx_gas: U256 = 21000.into(); // TODO: figure this out properly.
if gas_limit - gas_used < min_tx_gas {
break;
}
@@ -337,11 +337,11 @@ impl MinerService for Miner {
fn sensible_gas_price(&self) -> U256 {
// 10% above our minimum.
*self.transaction_queue.lock().unwrap().minimal_gas_price() * x!(110) / x!(100)
*self.transaction_queue.lock().unwrap().minimal_gas_price() * 110.into() / 100.into()
}
fn sensible_gas_limit(&self) -> U256 {
*self.gas_floor_target.read().unwrap() / x!(5)
*self.gas_floor_target.read().unwrap() / 5.into()
}
fn transactions_limit(&self) -> usize {