remove mocknet stuff, clean up debug
This commit is contained in:
@@ -29,7 +29,6 @@ use evm::Schedule;
|
||||
use ethjson;
|
||||
use io::{IoContext, IoHandler, TimerToken, IoService, IoChannel};
|
||||
use service::ClientIoMessage;
|
||||
use time::get_time;
|
||||
|
||||
/// `AuthorityRound` params.
|
||||
#[derive(Debug, PartialEq)]
|
||||
@@ -119,7 +118,10 @@ impl IoHandler<BlockArrived> for TransitionHandler {
|
||||
debug!(target: "authorityround", "Timeout step: {}", engine.step.load(AtomicOrdering::Relaxed));
|
||||
engine.step.fetch_add(1, AtomicOrdering::SeqCst);
|
||||
if let Some(ref channel) = *engine.message_channel.try_lock().unwrap() {
|
||||
channel.send(ClientIoMessage::UpdateSealing);
|
||||
match channel.send(ClientIoMessage::UpdateSealing) {
|
||||
Ok(_) => trace!(target: "authorityround", "timeout: UpdateSealing message sent."),
|
||||
Err(_) => trace!(target: "authorityround", "timeout: Could not send a sealing message."),
|
||||
}
|
||||
}
|
||||
io.register_timer_once(ENGINE_TIMEOUT_TOKEN, engine.our_params.step_duration).expect("Failed to restart consensus step timer.")
|
||||
}
|
||||
|
||||
@@ -132,7 +132,7 @@ pub trait Engine : Sync + Send {
|
||||
/// Panics if `is_builtin(a)` is not true.
|
||||
fn execute_builtin(&self, a: &Address, input: &[u8], output: &mut BytesRef) { self.builtins().get(a).unwrap().execute(input, output); }
|
||||
|
||||
/// Add a channel for communication with Client.
|
||||
fn register_message_channel(&self, message_channel: IoChannel<ClientIoMessage>) {}
|
||||
/// Add a channel for communication with Client which can be used for sealing.
|
||||
fn register_message_channel(&self, _message_channel: IoChannel<ClientIoMessage>) {}
|
||||
// TODO: sealing stuff - though might want to leave this for later.
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user