def get_chain(start: '', count: 10)
      logger.debug "get_chain", start: Utils.encode_hex(start), count: count

      if start.true?
        return [] unless @index.db.include?(start)

        block = get start
        return [] unless in_main_branch?(block)
      else
        block = head
      end

      blocks = []
      count.times do |i|
        blocks.push block
        break if block.genesis?
        block = block.get_parent
      end

      blocks
    end
def get_chain(start: '', count: 10)
      logger.debug "get_chain", start: Utils.encode_hex(start), count: count

      if start.true?
        return [] unless @index.db.include?(start)

        block = get start
        return [] unless in_main_branch?(block)
      else
        block = head
      end

      blocks = []
      count.times do |i|
        blocks.push block
        break if block.genesis?
        block = block.get_parent
      end

      blocks
    end
Return `count` of blocks starting from head or `start`.