From 4101414764d8d4058802c13983536477e5c4ffec Mon Sep 17 00:00:00 2001 From: UdjinM6 Date: Wed, 5 Jul 2023 21:27:39 +0300 Subject: [PATCH] chore: Drop `MSG_LEGACY_TXLOCK_REQUEST`/`LEGACYTXLOCKREQUEST` --- src/net_processing.cpp | 6 +----- src/protocol.cpp | 4 ---- src/protocol.h | 7 +++---- 3 files changed, 4 insertions(+), 13 deletions(-) diff --git a/src/net_processing.cpp b/src/net_processing.cpp index 3605b3e0defa..f2e23b745d95 100644 --- a/src/net_processing.cpp +++ b/src/net_processing.cpp @@ -1783,7 +1783,6 @@ bool PeerManagerImpl::AlreadyHave(const CInv& inv) { case MSG_TX: case MSG_DSTX: - case MSG_LEGACY_TXLOCK_REQUEST: // we treat legacy IX messages as TX messages { assert(recentRejects); if (m_chainman.ActiveChain().Tip()->GetBlockHash() != hashRecentRejectsChainTip) @@ -3502,7 +3501,7 @@ void PeerManagerImpl::ProcessMessage( return; } - if (msg_type == NetMsgType::TX || msg_type == NetMsgType::DSTX || msg_type == NetMsgType::LEGACYTXLOCKREQUEST) { + if (msg_type == NetMsgType::TX || msg_type == NetMsgType::DSTX) { CTransactionRef ptx; CCoinJoinBroadcastTx dstx; int nInvType = MSG_TX; @@ -3510,9 +3509,6 @@ void PeerManagerImpl::ProcessMessage( // Read data and assign inv type if(msg_type == NetMsgType::TX) { vRecv >> ptx; - } else if(msg_type == NetMsgType::LEGACYTXLOCKREQUEST) { - // we keep processing the legacy IX message here but revert to handling it as a regular TX - vRecv >> ptx; } else if (msg_type == NetMsgType::DSTX) { vRecv >> dstx; ptx = dstx.tx; diff --git a/src/protocol.cpp b/src/protocol.cpp index c93ec1f895b0..ae4ac612c8f4 100644 --- a/src/protocol.cpp +++ b/src/protocol.cpp @@ -47,7 +47,6 @@ MAKE_MSG(CFHEADERS, "cfheaders"); MAKE_MSG(GETCFCHECKPT, "getcfcheckpt"); MAKE_MSG(CFCHECKPT, "cfcheckpt"); // Dash message types -MAKE_MSG(LEGACYTXLOCKREQUEST, "ix"); MAKE_MSG(SPORK, "spork"); MAKE_MSG(GETSPORKS, "getsporks"); MAKE_MSG(DSACCEPT, "dsa"); @@ -129,7 +128,6 @@ const static std::string allNetMessageTypes[] = { NetMsgType::CFCHECKPT, // Dash message types // NOTE: do NOT include non-implmented here, we want them to be "Unknown command" in ProcessMessage() - NetMsgType::LEGACYTXLOCKREQUEST, NetMsgType::SPORK, NetMsgType::GETSPORKS, NetMsgType::SENDDSQUEUE, @@ -186,7 +184,6 @@ const static std::string netMessageTypesViolateBlocksOnly[] = { NetMsgType::DSSTATUSUPDATE, NetMsgType::DSTX, NetMsgType::DSVIN, - NetMsgType::LEGACYTXLOCKREQUEST, NetMsgType::QBSIGSHARES, NetMsgType::QCOMPLAINT, NetMsgType::QCONTRIB, @@ -312,7 +309,6 @@ const char* CInv::GetCommandInternal() const case MSG_TX: return NetMsgType::TX; case MSG_BLOCK: return NetMsgType::BLOCK; case MSG_FILTERED_BLOCK: return NetMsgType::MERKLEBLOCK; - case MSG_LEGACY_TXLOCK_REQUEST: return NetMsgType::LEGACYTXLOCKREQUEST; case MSG_CMPCT_BLOCK: return NetMsgType::CMPCTBLOCK; case MSG_SPORK: return NetMsgType::SPORK; case MSG_DSTX: return NetMsgType::DSTX; diff --git a/src/protocol.h b/src/protocol.h index 29ed167ef181..265228b1f0f2 100644 --- a/src/protocol.h +++ b/src/protocol.h @@ -253,7 +253,6 @@ extern const char *CFCHECKPT; // Dash message types // NOTE: do NOT declare non-implmented here, we don't want them to be exposed to the outside // TODO: add description -extern const char *LEGACYTXLOCKREQUEST; // only present for backwards compatibility extern const char *SPORK; extern const char *GETSPORKS; extern const char *DSACCEPT; @@ -448,9 +447,9 @@ enum GetDataMsg { // The following can only occur in getdata. Invs always use TX or BLOCK. MSG_FILTERED_BLOCK = 3, //!< Defined in BIP37 // Dash message types - // NOTE: declare non-implmented here, we must keep this enum consistent and backwards compatible - MSG_LEGACY_TXLOCK_REQUEST = 4, - /* MSG_TXLOCK_VOTE = 5, Legacy InstantSend and not used anymore */ + // NOTE: we must keep this enum consistent and backwards compatible + /* MSG_LEGACY_TXLOCK_REQUEST = 4, */ // Legacy InstantSend and not used anymore + /* MSG_TXLOCK_VOTE = 5, */ // Legacy InstantSend and not used anymore MSG_SPORK = 6, /* 7 - 15 were used in old Dash versions and were mainly budget and MN broadcast/ping related*/ MSG_DSTX = 16,