class BlockServiceConsumer implements BlockConsumer<T> {

    @Override
    public List<ConsensusBlock<T>> syncBlock(BranchId branchId, long offset, long limit) {
        long curBestBlock = branchGroup.getLastIndex(branchId);
        List<ConsensusBlock<T>> blockList = new ArrayList<>();
        if (curBestBlock == 0) {
            return blockList;
        }
        if (isNeedBlockSync(curBestBlock, offset)) {
            // Catchup Event!
            if (listener != null) {
                listener.catchUpRequest(branchId, offset);
            }
        } else {
            updateBlockList(branchId, offset, limit, blockList);
        }
        return blockList;
    }

    public  BlockServiceConsumer(BranchGroup branchGroup);

}