class EthHashSolver {

  public EthHashSolution solveFor(final EthHashSolverJob job)
      throws InterruptedException, ExecutionException {
    currentJob = Optional.of(job);
    if (stratumMiningEnabled) {
      ethHashObservers.forEach(observer -> observer.newJob(job.inputs));
    } else {
      findValidNonce();
    }
    return currentJob.get().getSolution();
  }

  public  EthHashSolver(
      final Iterable<Long> nonceGenerator,
      final EthHasher ethHasher,
      final Boolean stratumMiningEnabled,
      final Subscribers<EthHashObserver> ethHashObservers);

}