AuthorityRound network simulation test
This commit is contained in:
@@ -255,6 +255,11 @@ impl Client {
|
||||
self.notify.write().push(Arc::downgrade(&target));
|
||||
}
|
||||
|
||||
/// Returns engine reference.
|
||||
pub fn engine(&self) -> &Engine {
|
||||
&*self.engine
|
||||
}
|
||||
|
||||
fn notify<F>(&self, f: F) where F: Fn(&ChainNotify) {
|
||||
for np in self.notify.read().iter() {
|
||||
if let Some(n) = np.upgrade() {
|
||||
@@ -570,6 +575,11 @@ impl Client {
|
||||
results.len()
|
||||
}
|
||||
|
||||
/// Get shared miner reference.
|
||||
pub fn miner(&self) -> Arc<Miner> {
|
||||
self.miner.clone()
|
||||
}
|
||||
|
||||
/// Handle messages from the IO queue
|
||||
pub fn handle_queued_message(&self, message: &Bytes) {
|
||||
if let Err(e) = self.engine.handle_message(UntrustedRlp::new(message)) {
|
||||
|
||||
Reference in New Issue
Block a user