# File lib/rubytorrent/controller.rb, line 319
  def claim_blocks
    @piece_order.each(@in_fuseki, @peers.length) do |i|
      p = @package.pieces[i]
      next if p.complete?
#      rt_debug "+ considering piece #{p}"
      if @in_endgame
        p.each_empty_block(BLOCK_SIZE) { |b| yield b }
      else
        p.each_unclaimed_block(BLOCK_SIZE) do |b|
          if yield b
            p.claim_block b
            return if @in_fuseki # fuseki shortcut
          end
        end
      end
    end
  end