net: CNetAddr: add support to (un)serialize as ADDRv2

Co-authored-by: Carl Dong <contact@carldong.me>
This commit is contained in:
Vasil Dimov
2020-05-19 15:01:50 +02:00
parent fe42411b4b
commit e0d73573a3
5 changed files with 389 additions and 3 deletions

View File

@@ -14,6 +14,12 @@
#include <tuple>
/**
* A flag that is ORed into the protocol version to designate that a transaction
* should be (un)serialized without witness data.
* Make sure that this does not collide with any of the values in `version.h`
* or with `ADDRV2_FORMAT`.
*/
static const int SERIALIZE_TRANSACTION_NO_WITNESS = 0x40000000;
/** An outpoint - a combination of a transaction hash and an index n into its vout */