anchor.diff:  %% Convert a literal infohash to integer.
   hex_to_int_hash(X) ->
       list_to_integer(X, 16).
  -
  -
  -%% Block the remote peer, while having unserved requests from it.
  -choke_in_the_middle(Node, PeerPid) ->
  -    rpc:call(Node, etorrent_peer_control, choke, [PeerPid]),
  -    HasRequests = rpc:call(Node, etorrent_peer_control,
  -                           has_incoming_requests, [PeerPid]),
  -    case HasRequests of
  -        true -> ok;
  -        false ->
  -            rpc:call(Node, etorrent_peer_control, unchoke, [PeerPid]),
  -            timer:sleep(300),
  -            io:format("Try to choke again."),
  -            choke_in_the_middle(Node, PeerPid)
  -    end.
   
   
   copy_to(SrcFileName, DestDirName) ->
  
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:     after 30000 -> ok
      end,
      true.
  
  choked_reject() ->
      [{require, common_conf, etorrent_common_config}].
  