public void addBadBlock(final Block badBlock, final BadBlockCause cause) {
    LOG.debug("Register bad block {} with cause: {}", badBlock.toLogString(), cause);
    this.badBlocks.put(badBlock.getHash(), badBlock);
    badBlockSubscribers.forEach(s -> s.onBadBlockAdded(badBlock.getHeader(), cause));
  }
Add a new invalid block.

@param badBlock the invalid block
@param cause the cause detailing why the block is considered invalid
ethereum/core/src/main/java/org/hyperledger/besu/ethereum/chain/BadBlockManager.java