From e8364fc6669ba97943fabc15b7d060bcb70625df Mon Sep 17 00:00:00 2001 From: orignal Date: Mon, 27 Mar 2017 10:45:26 -0400 Subject: [PATCH] handle EdDSA addresses --- src/netbase.cpp | 4 ++-- src/netbase.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/netbase.cpp b/src/netbase.cpp index e56fa40..fb64b5d 100644 --- a/src/netbase.cpp +++ b/src/netbase.cpp @@ -723,8 +723,8 @@ bool CNetAddr::IsTor() const bool CNetAddr::IsNativeI2P() const { - static const unsigned char pchAAAA[] = {'A','A','A','A'}; - return (memcmp(i2pDest + NATIVE_I2P_DESTINATION_SIZE - sizeof(pchAAAA), pchAAAA, sizeof(pchAAAA)) == 0); + static const unsigned char pchAAA[] = {'A','A','A','='}; // EdDSA, TODO: + return (memcmp(i2pDest + NATIVE_I2P_DESTINATION_SIZE - sizeof(pchAAA), pchAAA, sizeof(pchAAA)) == 0); } std::string CNetAddr::GetI2PDestination() const diff --git a/src/netbase.h b/src/netbase.h index 7f3ac3d..72bcc0d 100644 --- a/src/netbase.h +++ b/src/netbase.h @@ -17,7 +17,7 @@ extern int nConnectTimeout; #undef SetPort #endif -#define NATIVE_I2P_DESTINATION_SIZE 516 +#define NATIVE_I2P_DESTINATION_SIZE 522 #define NATIVE_I2P_B32ADDR_SIZE 60 #define NATIVE_I2P_NET_STRING "i2p"