From 495e7feb62807ec90f3548cfae16d606453d05fc Mon Sep 17 00:00:00 2001 From: Nikolay Volf Date: Tue, 31 May 2016 21:13:32 +0200 Subject: [PATCH] dispatching message return --- sync/src/lib.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sync/src/lib.rs b/sync/src/lib.rs index 9fa6501a2..863ad6382 100644 --- a/sync/src/lib.rs +++ b/sync/src/lib.rs @@ -164,5 +164,12 @@ impl NetworkProtocolHandler for EthSync { } fn message(&self, io: &NetworkContext, message: &SyncMessage) { + match *message { + SyncMessage::NewChainBlocks { ref imported, ref invalid, ref enacted, ref retracted } => { + let mut sync_io = NetSyncIo::new(io, self.chain.deref()); + self.sync.write().unwrap().chain_new_blocks(&mut sync_io, imported, invalid, enacted, retracted); + }, + _ => {/* Ignore other messages */}, + } } }