Skip to content

Commit 18d7f5c

Browse files
committed
refactor: consolidate masternode mode logic to src/active/
Also: - Headers cleanup
1 parent 81258f3 commit 18d7f5c

26 files changed

+91
-92
lines changed

src/Makefile.am

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,10 @@ endif
145145
.PHONY: FORCE check-symbols check-security
146146
# dash core #
147147
BITCOIN_CORE_H = \
148+
active/context.h \
148149
active/dkgsession.h \
149150
active/dkgsessionhandler.h \
151+
active/masternode.h \
150152
active/quorums.h \
151153
addrdb.h \
152154
addressindex.h \
@@ -287,8 +289,6 @@ BITCOIN_CORE_H = \
287289
logging.h \
288290
logging/timer.h \
289291
mapport.h \
290-
masternode/active/context.h \
291-
masternode/node.h \
292292
masternode/meta.h \
293293
masternode/payments.h \
294294
masternode/sync.h \
@@ -475,8 +475,10 @@ libbitcoin_util_a-clientversion.$(OBJEXT): obj/build.h
475475
libbitcoin_node_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) $(BOOST_CPPFLAGS) $(MINIUPNPC_CPPFLAGS) $(NATPMP_CPPFLAGS) $(EVENT_CFLAGS) $(EVENT_PTHREADS_CFLAGS)
476476
libbitcoin_node_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
477477
libbitcoin_node_a_SOURCES = \
478+
active/context.cpp \
478479
active/dkgsession.cpp \
479480
active/dkgsessionhandler.cpp \
481+
active/masternode.cpp \
480482
active/quorums.cpp \
481483
addrdb.cpp \
482484
addressindex.cpp \
@@ -556,8 +558,6 @@ libbitcoin_node_a_SOURCES = \
556558
llmq/observer/context.cpp \
557559
llmq/observer/quorums.cpp \
558560
mapport.cpp \
559-
masternode/active/context.cpp \
560-
masternode/node.cpp \
561561
masternode/meta.cpp \
562562
masternode/payments.cpp \
563563
masternode/sync.cpp \
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22
// Distributed under the MIT software license, see the accompanying
33
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
44

5-
#include <masternode/active/context.h>
5+
#include <active/context.h>
66

77
#include <active/dkgsessionhandler.h>
8+
#include <active/masternode.h>
89
#include <active/quorums.h>
910
#include <chainlock/chainlock.h>
1011
#include <chainlock/signing.h>
@@ -19,7 +20,6 @@
1920
#include <llmq/ehf_signals.h>
2021
#include <llmq/quorumsman.h>
2122
#include <llmq/signing_shares.h>
22-
#include <masternode/node.h>
2323
#include <validation.h>
2424

2525
ActiveContext::ActiveContext(CBLSWorker& bls_worker, ChainstateManager& chainman, CConnman& connman,
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
// Distributed under the MIT software license, see the accompanying
33
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
44

5-
#ifndef BITCOIN_MASTERNODE_ACTIVE_CONTEXT_H
6-
#define BITCOIN_MASTERNODE_ACTIVE_CONTEXT_H
5+
#ifndef BITCOIN_ACTIVE_CONTEXT_H
6+
#define BITCOIN_ACTIVE_CONTEXT_H
77

88
#include <llmq/options.h>
99

@@ -99,4 +99,4 @@ struct ActiveContext final : public CValidationInterface {
9999
const std::unique_ptr<instantsend::InstantSendSigner> is_signer;
100100
};
101101

102-
#endif // BITCOIN_MASTERNODE_ACTIVE_CONTEXT_H
102+
#endif // BITCOIN_ACTIVE_CONTEXT_H

src/active/dkgsession.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44

55
#include <active/dkgsession.h>
66

7+
#include <active/masternode.h>
78
#include <evo/deterministicmns.h>
89
#include <llmq/debug.h>
910
#include <llmq/dkgsessionhandler.h>
1011
#include <llmq/dkgsessionmgr.h>
1112
#include <llmq/options.h>
1213
#include <masternode/meta.h>
13-
#include <masternode/node.h>
1414

1515
#include <chain.h>
1616
#include <deploymentstatus.h>

src/active/dkgsessionhandler.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
#include <active/dkgsessionhandler.h>
66

77
#include <active/dkgsession.h>
8+
#include <active/masternode.h>
89
#include <evo/deterministicmns.h>
910
#include <llmq/blockprocessor.h>
1011
#include <llmq/debug.h>
1112
#include <llmq/dkgsession.h>
1213
#include <llmq/options.h>
1314
#include <llmq/utils.h>
14-
#include <masternode/node.h>
1515

1616
#include <deploymentstatus.h>
1717
#include <logging.h>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Distributed under the MIT software license, see the accompanying
33
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
44

5-
#include <masternode/node.h>
5+
#include <active/masternode.h>
66

77
#include <bls/bls_ies.h>
88
#include <chainparams.h>
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
// Distributed under the MIT/X11 software license, see the accompanying
33
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
44

5-
#ifndef BITCOIN_MASTERNODE_NODE_H
6-
#define BITCOIN_MASTERNODE_NODE_H
5+
#ifndef BITCOIN_ACTIVE_MASTERNODE_H
6+
#define BITCOIN_ACTIVE_MASTERNODE_H
77

88
#include <bls/bls.h>
99

@@ -74,4 +74,4 @@ class CActiveMasternodeManager
7474
bool GetLocalAddress(CService& addrRet) EXCLUSIVE_LOCKS_REQUIRED(cs);
7575
};
7676

77-
#endif // BITCOIN_MASTERNODE_NODE_H
77+
#endif // BITCOIN_ACTIVE_MASTERNODE_H

src/active/quorums.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44

55
#include <active/quorums.h>
66

7+
#include <active/masternode.h>
78
#include <bls/bls_ies.h>
89
#include <evo/deterministicmns.h>
910
#include <llmq/commitment.h>
1011
#include <llmq/dkgsessionmgr.h>
1112
#include <llmq/options.h>
1213
#include <llmq/quorums.h>
1314
#include <llmq/utils.h>
14-
#include <masternode/node.h>
1515
#include <masternode/sync.h>
1616

1717
#include <chain.h>

src/coinjoin/server.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,21 @@
44

55
#include <coinjoin/server.h>
66

7-
#include <core_io.h>
7+
#include <active/masternode.h>
88
#include <evo/deterministicmns.h>
99
#include <masternode/meta.h>
10-
#include <masternode/node.h>
1110
#include <masternode/sync.h>
11+
#include <util/ranges.h>
12+
13+
#include <core_io.h>
1214
#include <net.h>
13-
#include <netmessagemaker.h>
1415
#include <net_processing.h>
16+
#include <netmessagemaker.h>
1517
#include <script/interpreter.h>
1618
#include <shutdown.h>
1719
#include <streams.h>
1820
#include <txmempool.h>
1921
#include <util/moneystr.h>
20-
#include <util/ranges.h>
2122
#include <util/system.h>
2223
#include <validation.h>
2324

src/evo/mnauth.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,14 @@
44

55
#include <evo/mnauth.h>
66

7+
#include <active/masternode.h>
78
#include <bls/bls.h>
8-
#include <chainparams.h>
99
#include <evo/deterministicmns.h>
1010
#include <llmq/utils.h>
1111
#include <masternode/meta.h>
12-
#include <masternode/node.h>
1312
#include <masternode/sync.h>
13+
14+
#include <chainparams.h>
1415
#include <net.h>
1516
#include <netmessagemaker.h>
1617
#include <util/time.h>

0 commit comments

Comments
 (0)