From 005ae79cf34dbf8cf8e2dbcc135dfedb24388bb3 Mon Sep 17 00:00:00 2001 From: Alexander Block Date: Tue, 19 Sep 2017 01:27:42 +0200 Subject: [PATCH] Refactor MSG_XXX enum values to align with Bitcoin core Needed as we skipped SegWit related backports --- src/protocol.h | 52 +++++++++++++++++++++++++------------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/src/protocol.h b/src/protocol.h index 4b001dcb36..e1f7adb1c8 100644 --- a/src/protocol.h +++ b/src/protocol.h @@ -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