value: don't print certificate id in toString by default

This commit is contained in:
Adrien Béraud committed 2018-12-28 01:38:45 -05:00
1 parent 086f37a71a
commit 71b9672b96
1 file changed
+3 -1
+3 -1
View File
@@ -54,12 +54,14 @@ std::ostream& operator<< (std::ostream& s, const Value& v)
s << IpServiceAnnouncement(v.data);
} else if (v.type == CERTIFICATE_TYPE.id) {
s << "Certificate";
#ifdef OPENDHT_LOG_CRT_ID
try {
InfoHash h = crypto::Certificate(v.data).getPublicKey().getId();
auto h = crypto::Certificate(v.data).getPublicKey().getLongId();
s << " with ID " << h;
} catch (const std::exception& e) {
s << " (invalid)";
}
#endif
} else {
s << "Data (type: " << v.type << " ): ";
s << std::hex;