adding message from client to sync and disabling sending transactions to the queue while syncing

This commit is contained in:
Nikolay Volf
2016-03-17 12:17:53 +01:00
parent 4050462ad4
commit 03ca9d2c06
5 changed files with 67 additions and 4 deletions

View File

@@ -334,6 +334,12 @@ impl<V> Client<V> where V: Verifier {
}
}
{
if self.queue_info().is_empty() {
io.send(NetworkIoMessage::User(SyncMessage::BlockQueueEmpty)).expect("error sending message to sync module");
}
}
imported
}

View File

@@ -40,6 +40,8 @@ pub enum SyncMessage {
NewChainHead,
/// A block is ready
BlockVerified,
/// blocks queue is empty
BlockQueueEmpty,
}
/// IO Message type used for Network service