Maintaining the statistics for propagation of pending transactions

This commit is contained in:
Tomasz Drwięga
2016-11-16 10:45:55 +01:00
parent 8dc7fcbe07
commit 4febd0eb93
5 changed files with 172 additions and 40 deletions

View File

@@ -262,7 +262,7 @@ impl Client {
}
}
/// Register an action to be done if a mode change happens.
/// Register an action to be done if a mode change happens.
pub fn on_mode_change<F>(&self, f: F) where F: 'static + FnMut(&Mode) + Send {
*self.on_mode_change.lock() = Some(Box::new(f));
}
@@ -890,7 +890,7 @@ impl BlockChainClient for Client {
trace!(target: "mode", "Making callback...");
f(&*mode)
},
_ => {}
_ => {}
}
}
match new_mode {

View File

@@ -41,16 +41,16 @@
//! }
//! ```
mod miner;
mod external;
mod transaction_queue;
mod banning_queue;
mod work_notify;
mod external;
mod miner;
mod price_info;
mod transaction_queue;
mod work_notify;
pub use self::transaction_queue::{TransactionQueue, PrioritizationStrategy, AccountDetails, TransactionOrigin};
pub use self::miner::{Miner, MinerOptions, Banning, PendingSet, GasPricer, GasPriceCalibratorOptions, GasLimit};
pub use self::external::{ExternalMiner, ExternalMinerService};
pub use self::miner::{Miner, MinerOptions, Banning, PendingSet, GasPricer, GasPriceCalibratorOptions, GasLimit};
pub use self::transaction_queue::{TransactionQueue, PrioritizationStrategy, AccountDetails, TransactionOrigin};
pub use client::TransactionImportResult;
use std::collections::BTreeMap;