Skip to content

Commit 6b43f25

Browse files
committed
refactor: use NetHandler class to separate instantsend logic and network logic
1 parent 8b82621 commit 6b43f25

File tree

10 files changed

+409
-374
lines changed

10 files changed

+409
-374
lines changed

src/Makefile.am

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,7 @@ BITCOIN_CORE_H = \
258258
instantsend/db.h \
259259
instantsend/instantsend.h \
260260
instantsend/lock.h \
261+
instantsend/net_instantsend.h \
261262
instantsend/signing.h \
262263
kernel/coinstats.h \
263264
key.h \
@@ -529,6 +530,7 @@ libbitcoin_node_a_SOURCES = \
529530
instantsend/db.cpp \
530531
instantsend/instantsend.cpp \
531532
instantsend/lock.cpp \
533+
instantsend/net_instantsend.cpp \
532534
instantsend/signing.cpp \
533535
kernel/coinstats.cpp \
534536
llmq/blockprocessor.cpp \

src/init.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@
8787
#include <flat-database.h>
8888
#include <governance/governance.h>
8989
#include <instantsend/instantsend.h>
90+
#include <instantsend/net_instantsend.h>
9091
#include <llmq/context.h>
9192
#include <llmq/dkgsessionmgr.h>
9293
#include <llmq/options.h>
@@ -2197,6 +2198,7 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
21972198
g_active_notification_interface = std::make_unique<ActiveNotificationInterface>(*node.active_ctx, *node.mn_activeman);
21982199
RegisterValidationInterface(g_active_notification_interface.get());
21992200
}
2201+
node.peerman->AddExtraHandler(std::make_unique<NetInstantSend>(node.peerman.get(), *node.llmq_ctx->isman, *node.llmq_ctx->qman, chainman.ActiveChainstate()));
22002202

22012203
// ********************************************************* Step 7d: Setup other Dash services
22022204

0 commit comments

Comments
 (0)