checking queue also

This commit is contained in:
Nikolay Volf 2016-03-15 23:58:46 +01:00
parent 99bae23996
commit 8427e99c73

View File

@ -321,10 +321,11 @@ impl<C, S, A, M, EM> Eth for EthClient<C, S, A, M, EM>
fn work(&self, params: Params) -> Result<Value, Error> {
match params {
Params::None => {
let client = take_weak!(self.client);
// check if we're still syncing and return empty strings int that case
{
let sync = take_weak!(self.sync);
if sync.status().state != SyncState::Idle {
if sync.status().state != SyncState::Idle && client.queue_info().is_empty() {
return to_value(&(String::new(), String::new(), String::new()));
}
}