Minor renaming.
This commit is contained in:
parent
31de739122
commit
599a6104b7
@ -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<AccountProvider>>) -> Arc<Miner> {
|
||||
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),
|
||||
|
@ -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<String>,
|
||||
pub flag_tx_gas_limit: Option<String>,
|
||||
pub flag_relay_set: String,
|
||||
pub flag_author: Option<String>,
|
||||
pub flag_usd_per_tx: String,
|
||||
|
@ -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,
|
||||
|
@ -55,7 +55,7 @@ fn miner_service(spec: Spec, accounts: Arc<AccountProvider>) -> Arc<Miner> {
|
||||
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,
|
||||
|
Loading…
Reference in New Issue
Block a user