diff -U2 -r /var/lib/copr-rpmbuild/results/i2pd-git/upstream-unpacked/Source0/i2pd-openssl/libi2pd_client/TorrentsDHT.cpp /var/lib/copr-rpmbuild/results/i2pd-git/srpm-unpacked/i2pd-openssl.tar.gz-extract/i2pd-openssl/libi2pd_client/TorrentsDHT.cpp --- /var/lib/copr-rpmbuild/results/i2pd-git/upstream-unpacked/Source0/i2pd-openssl/libi2pd_client/TorrentsDHT.cpp 2026-09-25 13:02:11.000000000 +0000 +++ /var/lib/copr-rpmbuild/results/i2pd-git/srpm-unpacked/i2pd-openssl.tar.gz-extract/i2pd-openssl/libi2pd_client/TorrentsDHT.cpp 2026-09-25 12:40:28.000000000 +0000 @@ -310,5 +310,4 @@ void TorrentsDHT::Start () { - std::string filename ("nodest"); auto dest = m_Tunnel.GetLocalDestination (); if (dest) @@ -317,13 +316,13 @@ if (dgramDest) dgramDest->SetReceiver (std::bind_front (&TorrentsDHT::HandleDatagram, this)); - filename = dest->GetIdentHash ().ToBase32 (); } if (m_RoutingTable) - m_RoutingTable->Load (GetDHTFilePath (filename)); + m_RoutingTable->Load (GetDHTFilename ()); } void TorrentsDHT::Stop () { - std::string filename ("nodest"); + if (m_RoutingTable) + m_RoutingTable->Save (GetDHTFilename ()); auto dest = m_Tunnel.GetLocalDestination (); if (dest) @@ -332,17 +331,14 @@ if (dgramDest) dgramDest->ResetReceiver (); - filename = dest->GetIdentHash ().ToBase32 (); } - if (m_RoutingTable) - m_RoutingTable->Save (GetDHTFilePath (filename)); } - std::filesystem::path TorrentsDHT::GetDHTFilePath (std::string_view filename) const + std::filesystem::path TorrentsDHT::GetDHTFilename () const { - std::filesystem::path dhtFilePath (i2p::fs::GetDataDir()); dhtFilePath /= "torrents"; - if (!std::filesystem::exists (dhtFilePath)) - std::filesystem::create_directories (dhtFilePath); - dhtFilePath /= filename; dhtFilePath += ".dht"; - return dhtFilePath; + std::filesystem::path dhtFilename (i2p::fs::GetDataDir()); dhtFilename /= "torrents"; + if (!std::filesystem::exists (dhtFilename)) + std::filesystem::create_directories (dhtFilename); + dhtFilename /= m_Tunnel.GetTunnelName (); dhtFilename += ".dht"; + return dhtFilename; } diff -U2 -r /var/lib/copr-rpmbuild/results/i2pd-git/upstream-unpacked/Source0/i2pd-openssl/libi2pd_client/TorrentsDHT.h /var/lib/copr-rpmbuild/results/i2pd-git/srpm-unpacked/i2pd-openssl.tar.gz-extract/i2pd-openssl/libi2pd_client/TorrentsDHT.h --- /var/lib/copr-rpmbuild/results/i2pd-git/upstream-unpacked/Source0/i2pd-openssl/libi2pd_client/TorrentsDHT.h 2026-09-25 13:02:11.000000000 +0000 +++ /var/lib/copr-rpmbuild/results/i2pd-git/srpm-unpacked/i2pd-openssl.tar.gz-extract/i2pd-openssl/libi2pd_client/TorrentsDHT.h 2026-09-25 12:40:28.000000000 +0000 @@ -177,5 +177,5 @@ uint64_t token, const i2p::data::IdentHash& toIdent, uint16_t toPort); - std::filesystem::path GetDHTFilePath (std::string_view filename) const; + std::filesystem::path GetDHTFilename () const; private: diff -U2 -r /var/lib/copr-rpmbuild/results/i2pd-git/upstream-unpacked/Source0/i2pd-openssl/libi2pd_client/TorrentsTunnel.h /var/lib/copr-rpmbuild/results/i2pd-git/srpm-unpacked/i2pd-openssl.tar.gz-extract/i2pd-openssl/libi2pd_client/TorrentsTunnel.h --- /var/lib/copr-rpmbuild/results/i2pd-git/upstream-unpacked/Source0/i2pd-openssl/libi2pd_client/TorrentsTunnel.h 2026-09-25 13:02:11.000000000 +0000 +++ /var/lib/copr-rpmbuild/results/i2pd-git/srpm-unpacked/i2pd-openssl.tar.gz-extract/i2pd-openssl/libi2pd_client/TorrentsTunnel.h 2026-09-25 12:40:28.000000000 +0000 @@ -119,4 +119,5 @@ const char* GetName() const override { return m_Name.c_str (); } + std::string_view GetTunnelName () const { return m_Name; } private: