use of co.rsk.metrics.BlockHeaderElement in project rskj by rsksmart.
the class RskContext method getHashRateCalculator.
public synchronized HashRateCalculator getHashRateCalculator() {
checkIfNotClosed();
if (hashRateCalculator == null) {
RskCustomCache<Keccak256, BlockHeaderElement> cache = new RskCustomCache<>(60000L);
if (!getRskSystemProperties().isMinerServerEnabled()) {
hashRateCalculator = new HashRateCalculatorNonMining(getBlockStore(), cache);
} else {
RskAddress coinbase = getMiningConfig().getCoinbaseAddress();
hashRateCalculator = new HashRateCalculatorMining(getBlockStore(), cache, coinbase);
}
}
return hashRateCalculator;
}
Aggregations