From 4267e7da93a7394ad7059b6f71569642446f04a6 Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Sat, 5 Oct 2013 10:19:12 -0400 Subject: Remove a whole bunch of now-unnecessary cruft from Topology and PacketDecoder. --- node/Identity.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'node/Identity.cpp') diff --git a/node/Identity.cpp b/node/Identity.cpp index 7ef83ade..8a6fc9ad 100644 --- a/node/Identity.cpp +++ b/node/Identity.cpp @@ -36,13 +36,12 @@ #include "Salsa20.hpp" #include "Utils.hpp" +// Mask for second byte in hashcash criterion -- making it require +// 13 0 bits at the start of the hash. #define ZT_IDENTITY_SHA_BYTE1_MASK 0xf8 namespace ZeroTier { -/* - * This is the hashcash criterion - */ struct _Identity_generate_cond { _Identity_generate_cond() throw() {} @@ -80,6 +79,8 @@ void Identity::generate() bool Identity::locallyValidate() const { + if (_address.isReserved()) + return false; char sha512buf[64]; char addrb[5]; _address.copyTo(addrb,5); -- cgit v1.2.3