private void assertRunning() {
    if (state != State.RUNNING) {
      throw new IllegalStateException(
          "Attempt to interact with "
              + getClass().getSimpleName()
              + " that is not running. Current State is "
              + state.name()
              + ".");
    }
  }
Schedule task.

@param command the command
@param delay the delay
@param unit the unit
@return the scheduled future
consensus/common/src/main/java/org/hyperledger/besu/consensus/common/bft/BftExecutors.java