check presense of introducers in SSU2 address

This commit is contained in:
orignal 2022-04-28 11:43:33 -04:00
parent 9db7ec6bb0
commit e970deb92b
3 changed files with 9 additions and 13 deletions

View file

@ -137,7 +137,7 @@ namespace data
bool operator==(const Address& other) const
{
return transportStyle == other.transportStyle && IsNTCP2 () == other.IsNTCP2 () &&
return transportStyle == other.transportStyle &&
host == other.host && port == other.port;
}
@ -149,7 +149,7 @@ namespace data
bool IsNTCP2 () const { return transportStyle == eTransportNTCP; };
bool IsSSU2 () const { return transportStyle == eTransportSSU2; };
bool IsPublishedNTCP2 () const { return IsNTCP2 () && published; };
bool IsReachableSSU () const { return (bool)ssu && (published || !ssu->introducers.empty ()); };
bool IsReachableSSU () const { return (bool)ssu && (published || UsesIntroducer ()); };
bool UsesIntroducer () const { return (bool)ssu && !ssu->introducers.empty (); };
bool IsIntroducer () const { return caps & eSSUIntroducer; };