private void discardPreviousHeightMessages() {
    if (!buffer.isEmpty()) {
      for (long h = buffer.firstKey(); h <= chainHeight; h++) {
        buffer.remove(h);
      }
    }
  }
Retrieve messages for height.

@param height the height
@return the list
consensus/common/src/main/java/org/hyperledger/besu/consensus/common/bft/statemachine/FutureMessageBuffer.java