Skip to content

Commit d142fc8

Browse files
UdjinM6claude
andcommitted
refactor: remove dead m_dsq client-side relay from MessageProcessingResult
Client-side DSQ relay was removed in dashpay#7070 but the m_dsq field and its population in CCoinJoinClientQueueManager::ProcessMessage were left behind as dead code. The network has been running without client-side DSQ relay with no issues since masternodes handle DSQ propagation through their own CCoinJoinServer::ProcessDSQUEUE path. Remove the dead code and fix transitive include dependencies that were masked by msg_result.h pulling in coinjoin/coinjoin.h. This also resolves two circular dependency chains that went through that link. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 32fa1a8 commit d142fc8

File tree

6 files changed

+5
-9
lines changed

6 files changed

+5
-9
lines changed

src/coinjoin/client.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,6 @@ MessageProcessingResult CCoinJoinClientQueueManager::ProcessMessage(NodeId from,
142142
WITH_LOCK(cs_vecqueue, vecCoinJoinQueue.push_back(dsq));
143143
}
144144
} // cs_ProcessDSQueue
145-
ret.m_dsq.push_back(dsq);
146145
return ret;
147146
}
148147

src/instantsend/net_instantsend.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
#include <thread>
1616
#include <vector>
1717

18+
class CChainState;
19+
1820
namespace Consensus {
1921
struct LLMQParams;
2022
} // namespace Consensus

src/instantsend/signing.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
#include <instantsend/lock.h>
99
#include <llmq/signing.h>
10+
#include <primitives/transaction.h>
1011

1112
#include <optional>
1213

src/msg_result.h

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
#ifndef BITCOIN_MSG_RESULT_H
66
#define BITCOIN_MSG_RESULT_H
77

8-
#include <coinjoin/coinjoin.h>
9-
108
#include <protocol.h>
119
#include <uint256.h>
1210

@@ -50,9 +48,6 @@ struct MessageProcessingResult
5048
//! @m_inventory will relay these inventories to connected peers
5149
std::vector<CInv> m_inventory;
5250

53-
//! @m_dsq will relay DSQs to connected peers
54-
std::vector<CCoinJoinQueue> m_dsq;
55-
5651
//! @m_transactions will relay transactions to peers which is ready to accept it (some peers does not accept transactions)
5752
std::vector<uint256> m_transactions;
5853

@@ -68,7 +63,7 @@ struct MessageProcessingResult
6863
m_error(error)
6964
{}
7065

71-
bool empty() const { return !m_error.has_value() && m_inventory.empty() && m_dsq.empty() && m_transactions.empty() && !m_to_erase.has_value(); }
66+
bool empty() const { return !m_error.has_value() && m_inventory.empty() && m_transactions.empty() && !m_to_erase.has_value(); }
7267
};
7368

7469
#endif // BITCOIN_MSG_RESULT_H

src/rpc/quorums.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
#include <util/helpers.h>
2525

2626
#include <chainparams.h>
27+
#include <core_io.h>
2728
#include <deploymentstatus.h>
2829
#include <index/txindex.h>
2930
#include <net_processing.h>

test/lint/lint-circular-dependencies.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,7 @@
2323
# Dash
2424
"active/context -> active/dkgsessionhandler -> llmq/dkgsessionhandler -> net_processing -> active/context",
2525
"banman -> common/bloom -> evo/assetlocktx -> llmq/quorumsman -> net -> banman",
26-
"chainlock/chainlock -> spork -> msg_result -> coinjoin/coinjoin -> chainlock/chainlock",
2726
"chainlock/chainlock -> spork -> net -> evo/deterministicmns -> evo/providertx -> validation -> chainlock/chainlock",
28-
"coinjoin/coinjoin -> instantsend/instantsend -> spork -> msg_result -> coinjoin/coinjoin",
2927
"coinjoin/client -> coinjoin/util -> wallet/wallet -> psbt -> node/transaction -> net_processing -> coinjoin/walletman -> coinjoin/client",
3028
"common/bloom -> evo/assetlocktx -> llmq/commitment -> evo/deterministicmns -> evo/simplifiedmns -> merkleblock -> common/bloom",
3129
"common/bloom -> evo/assetlocktx -> llmq/quorumsman -> net -> common/bloom",

0 commit comments

Comments
 (0)