add tracing
This commit is contained in:
parent
3419549c16
commit
b144bd2b84
@ -470,6 +470,7 @@ impl Client {
|
||||
|
||||
/// Import transactions from the IO queue
|
||||
pub fn import_queued_transactions(&self, transactions: &[Bytes]) -> usize {
|
||||
trace!(target: "external_tx", "Importing queued");
|
||||
let _timer = PerfTimer::new("import_queued_transactions");
|
||||
self.queue_transactions.fetch_sub(transactions.len(), AtomicOrdering::SeqCst);
|
||||
let txs = transactions.iter().filter_map(|bytes| UntrustedRlp::new(bytes).as_val().ok()).collect();
|
||||
@ -1060,6 +1061,7 @@ impl BlockChainClient for Client {
|
||||
let len = transactions.len();
|
||||
match self.io_channel.send(ClientIoMessage::NewTransactions(transactions)) {
|
||||
Ok(_) => {
|
||||
trace!(target: "external_tx", "Sending IoMessage");
|
||||
self.queue_transactions.fetch_add(len, AtomicOrdering::SeqCst);
|
||||
}
|
||||
Err(e) => {
|
||||
|
@ -78,7 +78,7 @@ impl Default for MinerOptions {
|
||||
MinerOptions {
|
||||
new_work_notify: vec![],
|
||||
force_sealing: false,
|
||||
reseal_on_external_tx: false,
|
||||
reseal_on_external_tx: true,
|
||||
reseal_on_own_tx: true,
|
||||
tx_gas_limit: !U256::zero(),
|
||||
tx_queue_size: 1024,
|
||||
@ -397,6 +397,7 @@ impl Miner {
|
||||
if !block.transactions().is_empty() {
|
||||
if let Ok(sealed) = self.seal_block_internally(block) {
|
||||
if chain.import_block(sealed.rlp_bytes()).is_ok() {
|
||||
trace!(target: "miner", "import_block_internally: imported internally sealed block");
|
||||
return true
|
||||
}
|
||||
}
|
||||
@ -659,7 +660,7 @@ impl MinerService for Miner {
|
||||
chain: &MiningBlockChainClient,
|
||||
transactions: Vec<SignedTransaction>
|
||||
) -> Vec<Result<TransactionImportResult, Error>> {
|
||||
|
||||
trace!(target: "external_tx", "Importing external transactions");
|
||||
let results = {
|
||||
let mut transaction_queue = self.transaction_queue.lock();
|
||||
self.add_transactions_to_queue(
|
||||
|
Loading…
Reference in New Issue
Block a user