diff --git a/libi2pd_client/Torrents.cpp b/libi2pd_client/Torrents.cpp index 4d4a0946..0fc89fa9 100644 --- a/libi2pd_client/Torrents.cpp +++ b/libi2pd_client/Torrents.cpp @@ -317,7 +317,7 @@ namespace torrents if (key == "interval") { auto [value, l] = ExtractInteger (buf); - if (l) m_Interval = std::min (MIN_TRACKER_REQUESTS_INTERVAL, (int)value*1000); // in milliseconds + if (l) m_Interval = std::max (MIN_TRACKER_REQUESTS_INTERVAL, (int)value*1000); // in milliseconds return l; } else if (key == "peers") @@ -333,8 +333,8 @@ namespace torrents while (!hashes.empty ()) { m_Peers.emplace_back (std::make_shared( - i2p::data::IdentHash((const uint8_t *)hashes.substr (0, SHA256_DIGEST_LENGTH).data ()))); - hashes = hashes.substr (SHA256_DIGEST_LENGTH); + i2p::data::IdentHash((const uint8_t *)hashes.substr (0, i2p::data::IdentHash::len).data ()))); + hashes = hashes.substr (i2p::data::IdentHash::len); } return len; } @@ -854,7 +854,7 @@ namespace torrents params.emplace ("uploaded", "0"); // TODO params.emplace ("downloaded", "0"); // TODO params.emplace ("left", "1"); // TODO - params.emplace ("numwant", "0"); // TODO + params.emplace ("numwant", "25"); // max num of peers, 0 if seeding reqURL.create_query (params); auto req = std::make_shared >(boost::beast::http::verb::get, reqURL.to_string (true), 11); // HTTP 1.1