From 599a6104b7fd794a132316466995720976f163bd Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Tue, 28 Jun 2016 10:40:35 +0200 Subject: [PATCH] Minor renaming. --- ethcore/src/miner/miner.rs | 6 +++--- parity/cli.rs | 4 ++-- parity/configuration.rs | 2 +- rpc/src/v1/tests/eth.rs | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ethcore/src/miner/miner.rs b/ethcore/src/miner/miner.rs index 2623ce3d9..803706c56 100644 --- a/ethcore/src/miner/miner.rs +++ b/ethcore/src/miner/miner.rs @@ -51,7 +51,7 @@ pub struct MinerOptions { /// Reseal on receipt of new local transactions. pub reseal_on_own_tx: bool, /// Maximum amount of gas to bother considering for block insertion. - pub max_tx_gas: U256, + pub tx_gas_limit: U256, /// Maximum size of the transaction queue. pub tx_queue_size: usize, /// Whether we should fallback to providing all the queue's transactions or just pending. @@ -64,7 +64,7 @@ impl Default for MinerOptions { force_sealing: false, reseal_on_external_tx: true, reseal_on_own_tx: true, - max_tx_gas: !U256::zero(), + tx_gas_limit: !U256::zero(), tx_queue_size: 1024, pending_set: PendingSet::AlwaysQueue, } @@ -109,7 +109,7 @@ impl Miner { /// Creates new instance of miner pub fn new(options: MinerOptions, spec: Spec, accounts: Option>) -> Arc { Arc::new(Miner { - transaction_queue: Mutex::new(TransactionQueue::with_limits(options.tx_queue_size, options.max_tx_gas)), + transaction_queue: Mutex::new(TransactionQueue::with_limits(options.tx_queue_size, options.tx_gas_limit)), sealing_enabled: AtomicBool::new(options.force_sealing), options: options, sealing_block_last_request: Mutex::new(0), diff --git a/parity/cli.rs b/parity/cli.rs index 4999caf65..3ee6f31c8 100644 --- a/parity/cli.rs +++ b/parity/cli.rs @@ -139,7 +139,7 @@ Sealing/Mining Options: own - reseal only on a new local transaction; ext - reseal only on a new external transaction; all - reseal on all new transactions [default: all]. - --max-tx-gas GAS Apply a limit of GAS as the maximum amount of gas + --tx-gas-limit GAS Apply a limit of GAS as the maximum amount of gas a single transaction may have for it to be mined. --relay-set SET Set of transactions to relay. SET may be: cheap - Relay any transaction in the queue (this @@ -305,7 +305,7 @@ pub struct Args { pub flag_no_token: bool, pub flag_force_sealing: bool, pub flag_reseal_on_txs: String, - pub flag_max_tx_gas: Option, + pub flag_tx_gas_limit: Option, pub flag_relay_set: String, pub flag_author: Option, pub flag_usd_per_tx: String, diff --git a/parity/configuration.rs b/parity/configuration.rs index acae3b5f4..4bd0cd493 100644 --- a/parity/configuration.rs +++ b/parity/configuration.rs @@ -88,7 +88,7 @@ impl Configuration { force_sealing: self.args.flag_force_sealing, reseal_on_external_tx: ext, reseal_on_own_tx: own, - max_tx_gas: self.args.flag_max_tx_gas.as_ref().map_or(!U256::zero(), |d| Self::decode_u256(d, "--max-tx-gas")), + tx_gas_limit: self.args.flag_tx_gas_limit.as_ref().map_or(!U256::zero(), |d| Self::decode_u256(d, "--tx-gas-limit")), tx_queue_size: self.args.flag_tx_queue_size, pending_set: match self.args.flag_relay_set.as_str() { "cheap" => PendingSet::AlwaysQueue, diff --git a/rpc/src/v1/tests/eth.rs b/rpc/src/v1/tests/eth.rs index e3aed553f..88a12a74f 100644 --- a/rpc/src/v1/tests/eth.rs +++ b/rpc/src/v1/tests/eth.rs @@ -55,7 +55,7 @@ fn miner_service(spec: Spec, accounts: Arc) -> Arc { reseal_on_external_tx: true, reseal_on_own_tx: true, tx_queue_size: 1024, - max_tx_gas: !U256::zero(), + tx_gas_limit: !U256::zero(), pending_set: PendingSet::SealingOrElseQueue, }, spec,