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

Method RequestDestinationWithEncryptedLeaseSet

libi2pd/Destination.cpp:760–778  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

758 }
759
760 bool LeaseSetDestination::RequestDestinationWithEncryptedLeaseSet (std::shared_ptr<const i2p::data::BlindedPublicKey> dest, RequestComplete requestComplete)
761 {
762 if (!dest || !m_Pool || !IsReady ())
763 {
764 if (requestComplete)
765 boost::asio::post (m_Service, [requestComplete](void){requestComplete (nullptr);});
766 return false;
767 }
768 auto storeHash = dest->GetStoreHash ();
769 auto leaseSet = FindLeaseSet (storeHash);
770 if (leaseSet)
771 {
772 if (requestComplete)
773 boost::asio::post (m_Service, [requestComplete, leaseSet](void){requestComplete (leaseSet);});
774 return true;
775 }
776 boost::asio::post (m_Service, std::bind (&LeaseSetDestination::RequestLeaseSet, shared_from_this (), storeHash, requestComplete, dest));
777 return true;
778 }
779
780 void LeaseSetDestination::CancelDestinationRequest (const i2p::data::IdentHash& dest, bool notify)
781 {

Callers 6

ProcessStreamConnectMethod · 0.80
ProcessNamingLookupMethod · 0.80
HandleReceivedAddressMethod · 0.80
LookupCommandHandlerMethod · 0.80
PingCommandHandlerMethod · 0.80

Calls 1

GetStoreHashMethod · 0.80

Tested by

no test coverage detected