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

@@ -951,12 +951,13 @@ namespace data
LogPrint (eLogError, "NetDb: DatabaseLookup for zero ident. Ignored");
return;
}
auto key = i2p::data::ByteStreamToBase64 (buf, 32);
std::string key;
if (CheckLogLevel (eLogInfo))
key = i2p::data::ByteStreamToBase64 (buf, 32);
IdentHash replyIdent(buf + 32);
uint8_t flag = buf[64];
LogPrint (eLogDebug, "NetDb: DatabaseLookup for ", key, " received flags=", (int)flag);
uint8_t lookupType = flag & DATABASE_LOOKUP_TYPE_FLAGS_MASK;
const uint8_t * excluded = buf + 65;