public long getLastEpochBlock(final long blockNumber) {
    if (blockNumber < startBlock) {
      throw new IllegalArgumentException("Block number is before start block.");
    }
    return startBlock + ((blockNumber - startBlock) / epochLengthInBlocks) * epochLengthInBlocks;
  }
Gets last epoch block.

@param blockNumber the block number
@return the last epoch block
consensus/common/src/main/java/org/hyperledger/besu/consensus/common/EpochManager.java