diff options
| author | Vasil Dimov <[email protected]> | 2020-05-20 12:05:18 +0200 |
|---|---|---|
| committer | Vasil Dimov <[email protected]> | 2020-10-09 16:42:50 +0200 |
| commit | 353a3fdaad055eea42a0baf7326bdd591f541170 (patch) | |
| tree | ab25e783cbf347df239d98060f83dcf2ea72209a /src/netaddress.h | |
| parent | net: CAddress & CAddrMan: (un)serialize as ADDRv2 (diff) | |
| download | discoin-353a3fdaad055eea42a0baf7326bdd591f541170.tar.xz discoin-353a3fdaad055eea42a0baf7326bdd591f541170.zip | |
net: advertise support for ADDRv2 via new message
Introduce a new message `sendaddrv2` to signal support for ADDRv2.
Send the new message immediately after sending the `VERACK` message.
Add support for receiving and parsing ADDRv2 messages.
Send ADDRv2 messages (instead of ADDR) to a peer if he has
advertised support for it.
Co-authored-by: Carl Dong <[email protected]>
Diffstat (limited to 'src/netaddress.h')
| -rw-r--r-- | src/netaddress.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/netaddress.h b/src/netaddress.h index 59f1b87ad..a0992e70c 100644 --- a/src/netaddress.h +++ b/src/netaddress.h @@ -173,6 +173,12 @@ class CNetAddr bool IsRoutable() const; bool IsInternal() const; bool IsValid() const; + + /** + * Check if the current object can be serialized in pre-ADDRv2/BIP155 format. + */ + bool IsAddrV1Compatible() const; + enum Network GetNetwork() const; std::string ToString() const; std::string ToStringIP() const; |