class BlockServiceConsumer implements BlockConsumer<T> {

    @Override
    public void broadcastBlock(ConsensusBlock<T> block) {
        try {
            BranchId branchId = block.getBranchId();
            long nextIndex = branchGroup.getLastIndex(branchId) + 1;
            long receivedIndex = block.getIndex();

            if (receivedIndex == nextIndex) {
                branchGroup.addBlock(block, true);
            } else {
                log.trace("Received blockIndex({}) is not nextBlockIndex({}).",
                        block.getIndex(), nextIndex);
            }
        } catch (Exception e) {
            log.debug("BroadcastBlock() is failed. {}", e.getMessage());
        }
    }

    public  BlockServiceConsumer(BranchGroup branchGroup);

}