Backports to beta (#1919)
* RPC errors & logs (#1845) * Refactoring errors in RPC * Updating jsonrpc-core * Fixing code_at * Avoid mentioning obvious segments in proof [ci:skip] * fixed cache_manager lock order * Purging .derefs, fixing clippy warnings. (#1890) * Fixing clippy warnings * Purging derefs * Simplifying engine derefs * Simplifying more engine derefs * Adding more details to miner log * fixed #1889, .DS_Store is no longer treated as key file (#1892) * fixed #1889, .DS_Store is no longer treated as key file * ethstore filters directories, hidden files and common system files * fixed compiling * fix regression with geth dir * fix regression with geth dir * Fix ipc compilation and add ipc feature to test targets (#1902) * fix compilation and add it to the ci run * no separator? * use quotes and spaces * RocksDB version bump * Don't return deleted nodes that are not yet flushed (#1908) * polling & connection timeouts (#1910) * Peers RPC + UI displaying active/connected/max peers (#1915) * Peers API * Bumping Parity-UI * Fixing tests * Save nodes removed from backing_overlay until commit (#1917)
This commit is contained in:
@@ -290,8 +290,8 @@ impl Miner {
|
||||
for tx in transactions {
|
||||
let hash = tx.hash();
|
||||
match open_block.push_transaction(tx, None) {
|
||||
Err(Error::Execution(ExecutionError::BlockGasLimitReached { gas_limit, gas_used, .. })) => {
|
||||
debug!(target: "miner", "Skipping adding transaction to block because of gas limit: {:?}", hash);
|
||||
Err(Error::Execution(ExecutionError::BlockGasLimitReached { gas_limit, gas_used, gas })) => {
|
||||
debug!(target: "miner", "Skipping adding transaction to block because of gas limit: {:?} (limit: {:?}, used: {:?}, gas: {:?})", hash, gas_limit, gas_used, gas);
|
||||
// Exit early if gas left is smaller then min_tx_gas
|
||||
let min_tx_gas: U256 = 21000.into(); // TODO: figure this out properly.
|
||||
if gas_limit - gas_used < min_tx_gas {
|
||||
@@ -300,8 +300,8 @@ impl Miner {
|
||||
},
|
||||
// Invalid nonce error can happen only if previous transaction is skipped because of gas limit.
|
||||
// If there is errornous state of transaction queue it will be fixed when next block is imported.
|
||||
Err(Error::Execution(ExecutionError::InvalidNonce { .. })) => {
|
||||
debug!(target: "miner", "Skipping adding transaction to block because of invalid nonce: {:?}", hash);
|
||||
Err(Error::Execution(ExecutionError::InvalidNonce { expected, got })) => {
|
||||
debug!(target: "miner", "Skipping adding transaction to block because of invalid nonce: {:?} (expected: {:?}, got: {:?})", hash, expected, got);
|
||||
},
|
||||
// already have transaction - ignore
|
||||
Err(Error::Transaction(TransactionError::AlreadyImported)) => {},
|
||||
@@ -527,7 +527,7 @@ impl MinerService for Miner {
|
||||
|
||||
fn code(&self, chain: &MiningBlockChainClient, address: &Address) -> Option<Bytes> {
|
||||
let sealing_work = self.sealing_work.lock();
|
||||
sealing_work.queue.peek_last_ref().map_or_else(|| chain.code(address), |b| b.block().fields().state.code(address))
|
||||
sealing_work.queue.peek_last_ref().map_or_else(|| chain.latest_code(address), |b| b.block().fields().state.code(address))
|
||||
}
|
||||
|
||||
fn set_author(&self, author: Address) {
|
||||
|
||||
@@ -1467,7 +1467,7 @@ mod test {
|
||||
let keypair = KeyPair::create().unwrap();
|
||||
let tx = new_unsigned_tx(U256::from(123)).sign(keypair.secret());
|
||||
let tx2 = {
|
||||
let mut tx2 = tx.deref().clone();
|
||||
let mut tx2 = (*tx).clone();
|
||||
tx2.gas_price = U256::from(200);
|
||||
tx2.sign(keypair.secret())
|
||||
};
|
||||
@@ -1490,12 +1490,12 @@ mod test {
|
||||
let keypair = KeyPair::create().unwrap();
|
||||
let tx0 = new_unsigned_tx(U256::from(123)).sign(keypair.secret());
|
||||
let tx1 = {
|
||||
let mut tx1 = tx0.deref().clone();
|
||||
let mut tx1 = (*tx0).clone();
|
||||
tx1.nonce = U256::from(124);
|
||||
tx1.sign(keypair.secret())
|
||||
};
|
||||
let tx2 = {
|
||||
let mut tx2 = tx1.deref().clone();
|
||||
let mut tx2 = (*tx1).clone();
|
||||
tx2.gas_price = U256::from(200);
|
||||
tx2.sign(keypair.secret())
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user