public Optional<Block> pendingAncestorBlockOf(final Block block) {
    Block ancestor = block;
    int ancestorLevel = 0;
    while (pendingBlocks.containsKey(ancestor.getHeader().getParentHash())
        && ancestorLevel++ < pendingBlocks.size()) {
      ancestor = pendingBlocks.get(ancestor.getHeader().getParentHash()).block();
    }
    return Optional.of(ancestor);
  }
Get the lowest pending ancestor block saved for a block

@param block target block
@return An optional with the lowest ancestor pending block
ethereum/eth/src/main/java/org/hyperledger/besu/ethereum/eth/sync/state/PendingBlocksManager.java