Skip to content

Commit

Permalink
Check if synced when using eth_getWork (openethereum#9193)
Browse files Browse the repository at this point in the history
  • Loading branch information
mttmartin committed Jul 24, 2018
1 parent 4848c38 commit 54ed242
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions rpc/src/v1/impls/eth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -744,9 +744,8 @@ impl<C, SN: ?Sized, S: ?Sized, M, EM, T: StateInfo + 'static> Eth for EthClient<

// check if we're still syncing and return empty strings in that case
{
//TODO: check if initial sync is complete here
//let sync = self.sync;
if /*sync.status().state != SyncState::Idle ||*/ self.client.queue_info().total_queue_size() > MAX_QUEUE_SIZE_TO_MINE_ON {
let sync = self.syncing();
if sync != Ok(SyncStatus::None) || self.client.queue_info().total_queue_size() > MAX_QUEUE_SIZE_TO_MINE_ON {
trace!(target: "miner", "Syncing. Cannot give any work.");
return Err(errors::no_work());
}
Expand Down

0 comments on commit 54ed242

Please sign in to comment.