Browse Source

handle EdDSA addresses

pull/5/head
orignal 8 years ago
parent
commit
e8364fc666
  1. 4
      src/netbase.cpp
  2. 2
      src/netbase.h

4
src/netbase.cpp

@ -723,8 +723,8 @@ bool CNetAddr::IsTor() const @@ -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

2
src/netbase.h

@ -17,7 +17,7 @@ extern int nConnectTimeout; @@ -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"

Loading…
Cancel
Save