diff options
| author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2013-10-05 10:19:12 -0400 |
|---|---|---|
| committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2013-10-05 10:19:12 -0400 |
| commit | 4267e7da93a7394ad7059b6f71569642446f04a6 (patch) | |
| tree | 44b2a6fb57d924a3d48da47f9551b77f2978eedd /node/Identity.cpp | |
| parent | 0e43e5e8f2eddd5768873350d12103f2684bedbf (diff) | |
| download | infinitytier-4267e7da93a7394ad7059b6f71569642446f04a6.tar.gz infinitytier-4267e7da93a7394ad7059b6f71569642446f04a6.zip | |
Remove a whole bunch of now-unnecessary cruft from Topology and PacketDecoder.
Diffstat (limited to 'node/Identity.cpp')
| -rw-r--r-- | node/Identity.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
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); |
