@Override
  public void stop() {
    if (state.compareAndSet(State.RUNNING, State.STOPPED)) {
      blockchain.removeObserver(blockAddedObserverId);
      bftProcessor.stop();
      // Make sure the processor has stopped before shutting down the executors
      try {
        bftProcessor.awaitStop();
      } catch (final InterruptedException e) {
        LOG.debug("Interrupted while waiting for BftProcessor to stop.", e);
        Thread.currentThread().interrupt();
      }
      eventHandler.stop();
      bftExecutors.stop();
    }
  }
Instantiates a new Bft mining coordinator.

@param bftExecutors the bft executors
@param eventHandler the event handler
@param bftProcessor the bft processor
@param blockCreatorFactory the block creator factory
@param blockchain the blockchain
@param eventQueue the event queue
@param syncState the sync state
consensus/common/src/main/java/org/hyperledger/besu/consensus/common/bft/blockcreation/BftMiningCoordinator.java