Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Additional logs for own transactions #4278

Merged
merged 1 commit into from
Jan 24, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion ethcore/src/evm/interpreter/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ use bit_set::BitSet;

use util::*;

type CodePosition = usize;
type ProgramCounter = usize;

const ONE: U256 = U256([1, 0, 0, 0]);
Expand Down
7 changes: 7 additions & 0 deletions ethcore/src/miner/local_transactions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,36 +70,43 @@ impl LocalTransactionsList {
}

pub fn mark_pending(&mut self, hash: H256) {
debug!(target: "own_tx", "Imported to Current (hash {:?})", hash);
self.clear_old();
self.transactions.insert(hash, Status::Pending);
}

pub fn mark_future(&mut self, hash: H256) {
debug!(target: "own_tx", "Imported to Future (hash {:?})", hash);
self.transactions.insert(hash, Status::Future);
self.clear_old();
}

pub fn mark_rejected(&mut self, tx: SignedTransaction, err: TransactionError) {
debug!(target: "own_tx", "Transaction rejected (hash {:?}): {:?}", tx.hash(), err);
self.transactions.insert(tx.hash(), Status::Rejected(tx, err));
self.clear_old();
}

pub fn mark_replaced(&mut self, tx: SignedTransaction, gas_price: U256, hash: H256) {
debug!(target: "own_tx", "Transaction replaced (hash {:?}) by {:?} (new gas price: {:?})", tx.hash(), hash, gas_price);
self.transactions.insert(tx.hash(), Status::Replaced(tx, gas_price, hash));
self.clear_old();
}

pub fn mark_invalid(&mut self, tx: SignedTransaction) {
warn!(target: "own_tx", "Transaction marked invalid (hash {:?})", tx.hash());
self.transactions.insert(tx.hash(), Status::Invalid(tx));
self.clear_old();
}

pub fn mark_dropped(&mut self, tx: SignedTransaction) {
warn!(target: "own_tx", "Transaction dropped (hash {:?})", tx.hash());
self.transactions.insert(tx.hash(), Status::Dropped(tx));
self.clear_old();
}

pub fn mark_mined(&mut self, tx: SignedTransaction) {
info!(target: "own_tx", "Transaction mined (hash {:?})", tx.hash());
self.transactions.insert(tx.hash(), Status::Mined(tx));
self.clear_old();
}
Expand Down
5 changes: 1 addition & 4 deletions ethcore/src/miner/miner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -873,7 +873,6 @@ impl MinerService for Miner {
pending: PendingTransaction,
) -> Result<TransactionImportResult, Error> {

let hash = pending.transaction.hash();
trace!(target: "own_tx", "Importing transaction: {:?}", pending);

let imported = {
Expand All @@ -885,12 +884,10 @@ impl MinerService for Miner {
).pop().expect("one result returned per added transaction; one added => one result; qed");

match import {
Ok(ref res) => {
trace!(target: "own_tx", "Imported transaction to {:?} (hash: {:?})", res, hash);
Ok(_) => {
trace!(target: "own_tx", "Status: {:?}", transaction_queue.status());
},
Err(ref e) => {
trace!(target: "own_tx", "Failed to import transaction {:?} (hash: {:?})", e, hash);
trace!(target: "own_tx", "Status: {:?}", transaction_queue.status());
warn!(target: "own_tx", "Error importing transaction: {:?}", e);
},
Expand Down
3 changes: 0 additions & 3 deletions rpc/src/v1/helpers/signing_queue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,6 @@ pub enum QueueAddError {
LimitReached,
}

/// Message Receiver type
pub type QueueEventReceiver = mpsc::Receiver<QueueEvent>;

// TODO [todr] to consider: timeout instead of limit?
const QUEUE_LIMIT: usize = 50;

Expand Down