MCPcopy Create free account
hub / github.com/PurpleI2P/i2pd / ReplaceLocalDestinationHash

Method ReplaceLocalDestinationHash

libi2pd_client/ClientContext.cpp:393–403  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

391 }
392
393 bool ClientContext::ReplaceLocalDestinationHash (const i2p::data::IdentHash& oldIdentHash, const i2p::data::IdentHash& newIdentHash)
394 {
395 std::unique_lock<std::mutex> l(m_DestinationsMutex);
396 auto it = m_Destinations.find (oldIdentHash);
397 if (it == m_Destinations.end ()) return false;
398 auto dest = it->second;
399 if (!dest) return false;
400 m_Destinations.erase (it);
401 m_Destinations.emplace (newIdentHash, dest);
402 return true;
403 }
404
405
406 std::shared_ptr<ClientDestination> ClientContext::CreateNewLocalDestination (const i2p::data::PrivateKeys& keys, bool isPublic,

Callers 1

ResumeMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected