From 605d9d24a43571ef52cb282d0ff69e0c81725a96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Drwi=C4=99ga?= Date: Mon, 18 Jul 2016 13:50:45 +0200 Subject: [PATCH] Adding more details to miner log --- ethcore/src/miner/miner.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ethcore/src/miner/miner.rs b/ethcore/src/miner/miner.rs index 97ba6c082..ebc53d33f 100644 --- a/ethcore/src/miner/miner.rs +++ b/ethcore/src/miner/miner.rs @@ -292,8 +292,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 { @@ -302,8 +302,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)) => {},