Refactor MSG_XXX enum values to align with Bitcoin core

Needed as we skipped SegWit related backports
This commit is contained in:
Alexander Block 2017-09-19 01:27:42 +02:00
parent 552fafdae6
commit 005ae79cf3

View File

@ -319,6 +319,32 @@ public:
unsigned int nTime;
};
enum GetDataMsg {
UNDEFINED = 0,
MSG_TX,
MSG_BLOCK,
// The following can only occur in getdata. Invs always use TX or BLOCK.
MSG_FILTERED_BLOCK,
// Dash message types
// NOTE: declare non-implmented here, we must keep this enum consistent and backwards compatible
MSG_TXLOCK_REQUEST,
MSG_TXLOCK_VOTE,
MSG_SPORK,
MSG_MASTERNODE_PAYMENT_VOTE,
MSG_MASTERNODE_PAYMENT_BLOCK, // reusing, was MSG_MASTERNODE_SCANNING_ERROR previousely, was NOT used in 12.0
MSG_BUDGET_VOTE, // depreciated since 12.1
MSG_BUDGET_PROPOSAL, // depreciated since 12.1
MSG_BUDGET_FINALIZED, // depreciated since 12.1
MSG_BUDGET_FINALIZED_VOTE, // depreciated since 12.1
MSG_MASTERNODE_QUORUM, // not implemented
MSG_MASTERNODE_ANNOUNCE,
MSG_MASTERNODE_PING,
MSG_DSTX,
MSG_GOVERNANCE_OBJECT,
MSG_GOVERNANCE_OBJECT_VOTE,
MSG_MASTERNODE_VERIFY,
};
/** inv message data */
class CInv
{
@ -348,30 +374,4 @@ public:
uint256 hash;
};
enum {
MSG_TX = 1,
MSG_BLOCK,
// Nodes may always request a MSG_FILTERED_BLOCK in a getdata, however,
// MSG_FILTERED_BLOCK should not appear in any invs except as a part of getdata.
MSG_FILTERED_BLOCK,
// Dash message types
// NOTE: declare non-implmented here, we must keep this enum consistent and backwards compatible
MSG_TXLOCK_REQUEST,
MSG_TXLOCK_VOTE,
MSG_SPORK,
MSG_MASTERNODE_PAYMENT_VOTE,
MSG_MASTERNODE_PAYMENT_BLOCK, // reusing, was MSG_MASTERNODE_SCANNING_ERROR previousely, was NOT used in 12.0
MSG_BUDGET_VOTE, // depreciated since 12.1
MSG_BUDGET_PROPOSAL, // depreciated since 12.1
MSG_BUDGET_FINALIZED, // depreciated since 12.1
MSG_BUDGET_FINALIZED_VOTE, // depreciated since 12.1
MSG_MASTERNODE_QUORUM, // not implemented
MSG_MASTERNODE_ANNOUNCE,
MSG_MASTERNODE_PING,
MSG_DSTX,
MSG_GOVERNANCE_OBJECT,
MSG_GOVERNANCE_OBJECT_VOTE,
MSG_MASTERNODE_VERIFY,
};
#endif // BITCOIN_PROTOCOL_H