anchor.diff:  -export([seed_leech/0, seed_leech/1,
        udp_seed_leech/0, udp_seed_leech/1,
        down_udp_tracker/0, down_udp_tracker/1,
  -     choked_seed_leech/0, choked_seed_leech/1,
        choked_reject/0, choked_reject/1,
   	 seed_transmission/0, seed_transmission/1,
   	 leech_transmission/0, leech_transmission/1,
  
positive.code:             timer:sleep(500), wait_peer_registration(Node, TorrentID, PeerId)
      end.
  
  is_fast_peer(Node, PeerPid) ->
      case rpc:call(Node, etorrent_table, get_peer, [{pid, PeerPid}]) of
          {value, Props} ->
              proplists:get_bool(is_fast, Props)
      end.
  
  
  
  -spec wait_progress(Node::node(), TorrentID::non_neg_integer(),
                      Percent:: 0 .. 100) -> ok.
  wait_progress(Node, TorrentID, Percent) ->
      {value, Props} = rpc:call(Node, etorrent_torrent, lookup, [TorrentID]),
      Left = proplists:get_value(left, Props),
      Want = proplists:get_value(wanted, Props),
      if (Want - Left) / Want * 100 >= Percent -> ok;
          true -> timer:sleep(500), wait_progress(Node, TorrentID, Percent)
      end.
  
  hex_to_bin_hash(HexIH) ->
      IntIH = list_to_integer(HexIH, 16),
      <<IntIH:160>>.
  
negative.code: %% Tests
  %% ----------------------------------------------------------------------
  groups() ->
      Tests = [seed_transmission, leech_transmission, seed_leech,
               partial_downloading, udp_seed_leech, bep9,
               down_udp_tracker, checking, choked_reject],
  %   [{main_group, [shuffle], Tests}].
      [{main_group, [], Tests}].
  
  