use of org.hyperledger.besu.ethereum.mainnet.EpochCalculator in project besu by hyperledger.
the class PoWMinerExecutor method createMiner.
@Override
public PoWBlockMiner createMiner(final Subscribers<MinedBlockObserver> observers, final Subscribers<PoWObserver> ethHashObservers, final BlockHeader parentHeader) {
final PoWSolver solver = new PoWSolver(nonceGenerator, protocolSchedule.getByBlockNumber(parentHeader.getNumber() + 1).getPoWHasher().get(), stratumMiningEnabled, ethHashObservers, epochCalculator, powJobTimeToLive, maxOmmerDepth);
final Function<BlockHeader, PoWBlockCreator> blockCreator = (header) -> new PoWBlockCreator(coinbase.orElseGet(() -> MergeConfigOptions.isMergeEnabled() ? Address.ZERO : null), () -> targetGasLimit.map(AtomicLong::longValue), parent -> extraData, pendingTransactions, protocolContext, protocolSchedule, solver, minTransactionGasPrice, minBlockOccupancyRatio, parentHeader);
return new PoWBlockMiner(blockCreator, protocolSchedule, protocolContext, observers, blockScheduler, parentHeader);
}
Aggregations