don't calculate key's base64 if not used

This commit is contained in:
orignal
2025-03-17 20:08:39 -04:00
parent bbf5c1655a
commit 609cd401bb
2 changed files with 7 additions and 3 deletions

View File

@@ -360,9 +360,12 @@ namespace data
void NetDbRequests::HandleDatabaseSearchReplyMsg (std::shared_ptr<const I2NPMessage> msg)
{
const uint8_t * buf = msg->GetPayload ();
auto key = i2p::data::ByteStreamToBase64 (buf, 32);
std::string key;
size_t num = buf[32]; // num
if (CheckLogLevel (eLogInfo))
key = i2p::data::ByteStreamToBase64 (buf, 32);
LogPrint (eLogDebug, "NetDbReq: DatabaseSearchReply for ", key, " num=", num);
IdentHash ident (buf);
bool isExploratory = false;
auto dest = FindRequest (ident);