Revert "Make sure to produce full blocks."
This reverts commit b12d5920b2
.
This commit is contained in:
parent
5235a6ab03
commit
af1b4a82f3
@ -100,7 +100,6 @@ ui-precompiled = [
|
|||||||
]
|
]
|
||||||
ui-enabled = ["dapps"]
|
ui-enabled = ["dapps"]
|
||||||
dapps = ["parity-dapps"]
|
dapps = ["parity-dapps"]
|
||||||
miner-debug = ["ethcore/miner-debug"]
|
|
||||||
json-tests = ["ethcore/json-tests"]
|
json-tests = ["ethcore/json-tests"]
|
||||||
test-heavy = ["ethcore/test-heavy"]
|
test-heavy = ["ethcore/test-heavy"]
|
||||||
evm-debug = ["ethcore/evm-debug"]
|
evm-debug = ["ethcore/evm-debug"]
|
||||||
|
@ -74,10 +74,6 @@ trie-standardmap = { path = "../util/trie-standardmap" }
|
|||||||
kvdb-rocksdb = { path = "../util/kvdb-rocksdb" }
|
kvdb-rocksdb = { path = "../util/kvdb-rocksdb" }
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
# Disables seal verification for mined blocks.
|
|
||||||
# This allows you to submit any seal via RPC to test and benchmark
|
|
||||||
# how fast pending block get's created while running on the mainnet.
|
|
||||||
miner-debug = []
|
|
||||||
# Display EVM debug traces.
|
# Display EVM debug traces.
|
||||||
evm-debug = ["slow-blocks"]
|
evm-debug = ["slow-blocks"]
|
||||||
# Display EVM debug traces when running tests.
|
# Display EVM debug traces when running tests.
|
||||||
|
@ -289,18 +289,11 @@ impl Engine<EthereumMachine> for Arc<Ethash> {
|
|||||||
self.machine.note_rewards(block, &[(author, result_block_reward)], &uncle_rewards)
|
self.machine.note_rewards(block, &[(author, result_block_reward)], &uncle_rewards)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(not(feature = "miner-debug"))]
|
|
||||||
fn verify_local_seal(&self, header: &Header) -> Result<(), Error> {
|
fn verify_local_seal(&self, header: &Header) -> Result<(), Error> {
|
||||||
self.verify_block_basic(header)
|
self.verify_block_basic(header)
|
||||||
.and_then(|_| self.verify_block_unordered(header))
|
.and_then(|_| self.verify_block_unordered(header))
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "miner-debug")]
|
|
||||||
fn verify_local_seal(&self, _header: &Header) -> Result<(), Error> {
|
|
||||||
warn!("Skipping seal verification, running in miner testing mode.");
|
|
||||||
Ok(())
|
|
||||||
}
|
|
||||||
|
|
||||||
fn verify_block_basic(&self, header: &Header) -> Result<(), Error> {
|
fn verify_block_basic(&self, header: &Header) -> Result<(), Error> {
|
||||||
// check the seal fields.
|
// check the seal fields.
|
||||||
let seal = Seal::parse_seal(header.seal())?;
|
let seal = Seal::parse_seal(header.seal())?;
|
||||||
|
@ -95,7 +95,7 @@ const DEFAULT_MINIMAL_GAS_PRICE: u64 = 20_000_000_000;
|
|||||||
/// before stopping attempts to push more transactions to the block.
|
/// before stopping attempts to push more transactions to the block.
|
||||||
/// This is an optimization that prevents traversing the entire pool
|
/// This is an optimization that prevents traversing the entire pool
|
||||||
/// in case we have only a fraction of available block gas limit left.
|
/// in case we have only a fraction of available block gas limit left.
|
||||||
const MAX_SKIPPED_TRANSACTIONS: usize = 128;
|
const MAX_SKIPPED_TRANSACTIONS: usize = 8;
|
||||||
|
|
||||||
/// Configures the behaviour of the miner.
|
/// Configures the behaviour of the miner.
|
||||||
#[derive(Debug, PartialEq)]
|
#[derive(Debug, PartialEq)]
|
||||||
@ -391,7 +391,7 @@ impl Miner {
|
|||||||
let max_transactions = if min_tx_gas.is_zero() {
|
let max_transactions = if min_tx_gas.is_zero() {
|
||||||
usize::max_value()
|
usize::max_value()
|
||||||
} else {
|
} else {
|
||||||
MAX_SKIPPED_TRANSACTIONS.saturating_add((*open_block.block().header().gas_limit() / min_tx_gas).as_u64() as usize)
|
(*open_block.block().header().gas_limit() / min_tx_gas).as_u64() as usize
|
||||||
};
|
};
|
||||||
|
|
||||||
let pending: Vec<Arc<_>> = self.transaction_queue.pending(
|
let pending: Vec<Arc<_>> = self.transaction_queue.pending(
|
||||||
|
Loading…
Reference in New Issue
Block a user