@Override
    public boolean test(final Pair<Bytes32, Bytes> pair) {
      return endKey.compareTo(Bytes.wrap(pair.getFirst())) > 0;
    }
Predicate that stops when the end key is exceeded.
ethereum/eth/src/main/java/org/hyperledger/besu/ethereum/eth/manager/snap/SnapServer.java