mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-31 10:56:03 +02:00
net: extract conditional to bool CNetAddr::IsHeNet
and remove redundant public declaration
This commit is contained in:
@@ -210,6 +210,11 @@ bool CNetAddr::IsRFC7343() const
|
||||
return (GetByte(15) == 0x20 && GetByte(14) == 0x01 && GetByte(13) == 0x00 && (GetByte(12) & 0xF0) == 0x20);
|
||||
}
|
||||
|
||||
bool CNetAddr::IsHeNet() const
|
||||
{
|
||||
return (GetByte(15) == 0x20 && GetByte(14) == 0x01 && GetByte(13) == 0x04 && GetByte(12) == 0x70);
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns Whether or not this is a dummy address that maps an onion address
|
||||
* into IPv6.
|
||||
@@ -516,7 +521,7 @@ std::vector<unsigned char> CNetAddr::GetGroup(const std::vector<bool> &asmap) co
|
||||
} else if (IsTor()) {
|
||||
nStartByte = 6;
|
||||
nBits = 4;
|
||||
} else if (GetByte(15) == 0x20 && GetByte(14) == 0x01 && GetByte(13) == 0x04 && GetByte(12) == 0x70) {
|
||||
} else if (IsHeNet()) {
|
||||
// for he.net, use /36 groups
|
||||
nBits = 36;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user