Browse Source

less noisy. disable some dht announce and already connected messages

miguelfreitas
Miguel Freitas 11 years ago
parent
commit
cb7f080b75
  1. 2
      libtorrent/src/kademlia/node.cpp
  2. 2
      libtorrent/src/policy.cpp
  3. 2
      libtorrent/src/torrent.cpp
  4. 3
      src/bitcoinrpc.cpp

2
libtorrent/src/kademlia/node.cpp

@ -404,7 +404,7 @@ void node_impl::announce(std::string const& trackerName, sha1_hash const& info_h @@ -404,7 +404,7 @@ void node_impl::announce(std::string const& trackerName, sha1_hash const& info_h
#ifdef TORRENT_DHT_VERBOSE_LOGGING
TORRENT_LOG(node) << "announcing [ ih: " << info_hash << " p: " << listen_port << " ]" ;
#endif
printf("node_impl::announce '%s' host: %s:%d myself=%d\n", trackerName.c_str(), addr.to_string().c_str(), listen_port, myself);
//printf("node_impl::announce '%s' host: %s:%d myself=%d\n", trackerName.c_str(), addr.to_string().c_str(), listen_port, myself);
// [MF] is_unspecified() is not always available. never mind.
//if( !addr.is_unspecified() ) {

2
libtorrent/src/policy.cpp

@ -1354,7 +1354,7 @@ namespace libtorrent @@ -1354,7 +1354,7 @@ namespace libtorrent
char msg[200];
snprintf(msg, 200, "already connected to peer: %s %s"
, print_endpoint(remote).c_str(), hex_pid);
m_torrent->debug_log(msg);
//m_torrent->debug_log(msg);
TORRENT_ASSERT(p->connection->associated_torrent().lock().get() == m_torrent);
}

2
libtorrent/src/torrent.cpp

@ -2194,7 +2194,7 @@ namespace libtorrent @@ -2194,7 +2194,7 @@ namespace libtorrent
BOOST_FOREACH(tcp::endpoint const& p, peers) {
#if defined TORRENT_VERBOSE_LOGGING || defined TORRENT_LOGGING || defined TORRENT_ERROR_LOGGING
debug_log("on_dht_announce_response %s:%d (local=%d)", p.address().to_string().c_str(), p.port(), p==localpeer);
//debug_log("on_dht_announce_response %s:%d (local=%d)", p.address().to_string().c_str(), p.port(), p==localpeer);
#endif
if( p != localpeer ) {
m_policy.add_peer(p, peer_id(0), peer_info::dht, 0);

3
src/bitcoinrpc.cpp

@ -911,7 +911,8 @@ void JSONRequest::parse(const Value& valRequest) @@ -911,7 +911,8 @@ void JSONRequest::parse(const Value& valRequest)
if (valMethod.type() != str_type)
throw JSONRPCError(RPC_INVALID_REQUEST, "Method must be a string");
strMethod = valMethod.get_str();
if (strMethod != "getwork" && strMethod != "getblocktemplate")
if (strMethod != "getwork" && strMethod != "getblocktemplate" &&
strMethod != "getlasthave")
printf("ThreadRPCServer method=%s\n", strMethod.c_str());
// Parse params

Loading…
Cancel
Save