diff --git a/ethereum/core/src/main/java/net/consensys/pantheon/ethereum/blockcreation/EthHashMiningCoordinator.java b/ethereum/core/src/main/java/net/consensys/pantheon/ethereum/blockcreation/EthHashMiningCoordinator.java index 2d57b539e9..2bffd83913 100644 --- a/ethereum/core/src/main/java/net/consensys/pantheon/ethereum/blockcreation/EthHashMiningCoordinator.java +++ b/ethereum/core/src/main/java/net/consensys/pantheon/ethereum/blockcreation/EthHashMiningCoordinator.java @@ -58,4 +58,13 @@ public class EthHashMiningCoordinator extends AbstractMiningCoordinator miner.submitWork(solution)).orElse(false); } } + + @Override + protected void haltCurrentMiningOperation() { + currentRunningMiner.ifPresent( + miner -> { + miner.cancel(); + miner.getHashesPerSecond().ifPresent(val -> cachedHashesPerSecond = Optional.of(val)); + }); + } }