Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/evo/simplifiedmns.h
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,11 @@ class CSimplifiedMNListDiff

SERIALIZE_METHODS(CSimplifiedMNListDiff, obj)
{
if ((s.GetType() & SER_NETWORK) && s.GetVersion() >= MNLISTDIFF_VERSION_ORDER) {
READWRITE(obj.nVersion);
}
READWRITE(obj.baseBlockHash, obj.blockHash, obj.cbTxMerkleTree, obj.cbTx);
if ((s.GetType() & SER_NETWORK) && s.GetVersion() >= BLS_SCHEME_PROTO_VERSION) {
if ((s.GetType() & SER_NETWORK) && s.GetVersion() >= BLS_SCHEME_PROTO_VERSION && s.GetVersion() < MNLISTDIFF_VERSION_ORDER) {
READWRITE(obj.nVersion);
}
READWRITE(obj.deletedMNs, obj.mnList);
Expand Down
5 changes: 4 additions & 1 deletion src/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*/


static const int PROTOCOL_VERSION = 70228;
static const int PROTOCOL_VERSION = 70229;

//! initial proto version, to be increased after version/verack negotiation
static const int INIT_PROTO_VERSION = 209;
Expand Down Expand Up @@ -52,6 +52,9 @@ static const int DMN_TYPE_PROTO_VERSION = 70227;
//! Versioned Simplified Masternode List Entries were introduced in this version
static const int SMNLE_VERSIONED_PROTO_VERSION = 70228;

//! Versioned Simplified Masternode List Entries were introduced in this version
static const int MNLISTDIFF_VERSION_ORDER = 70229;

// Make sure that none of the values above collide with `ADDRV2_FORMAT`.

#endif // BITCOIN_VERSION_H
4 changes: 2 additions & 2 deletions test/functional/test_framework/messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
import dash_hash

MIN_VERSION_SUPPORTED = 60001
MY_VERSION = 70228 # SMNLE_VERSIONED_PROTO_VERSION
MY_VERSION = 70229 # MNLISTDIFF_VERSION_ORDER
MY_SUBVERSION = b"/python-mininode-tester:0.0.3%s/"
MY_RELAY = 1 # from version 70001 onwards, fRelay should be appended to version messages (BIP37)

Expand Down Expand Up @@ -2038,13 +2038,13 @@ def __init__(self):
self.newQuorums = []

def deserialize(self, f):
self.nVersion = struct.unpack("<H", f.read(2))[0]
self.baseBlockHash = deser_uint256(f)
self.blockHash = deser_uint256(f)
self.merkleProof.deserialize(f)
self.cbTx = CTransaction()
self.cbTx.deserialize(f)
self.cbTx.rehash()
self.nVersion = struct.unpack("<H", f.read(2))[0]
self.deletedMNs = deser_uint256_vector(f)
self.mnList = []
for i in range(deser_compact_size(f)):
Expand Down