Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/Makefile.am
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -258,6 +258,7 @@ BITCOIN_CORE_H = \
instantsend/db.h \ instantsend/db.h \
instantsend/instantsend.h \ instantsend/instantsend.h \
instantsend/lock.h \ instantsend/lock.h \
instantsend/net_instantsend.h \
instantsend/signing.h \ instantsend/signing.h \
kernel/coinstats.h \ kernel/coinstats.h \
key.h \ key.h \
Expand Down Expand Up @@ -529,6 +530,7 @@ libbitcoin_node_a_SOURCES = \
instantsend/db.cpp \ instantsend/db.cpp \
instantsend/instantsend.cpp \ instantsend/instantsend.cpp \
instantsend/lock.cpp \ instantsend/lock.cpp \
instantsend/net_instantsend.cpp \
instantsend/signing.cpp \ instantsend/signing.cpp \
kernel/coinstats.cpp \ kernel/coinstats.cpp \
llmq/blockprocessor.cpp \ llmq/blockprocessor.cpp \
Expand Down
9 changes: 9 additions & 0 deletions src/init.cpp
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@
#include <flat-database.h> #include <flat-database.h>
#include <governance/governance.h> #include <governance/governance.h>
#include <instantsend/instantsend.h> #include <instantsend/instantsend.h>
#include <instantsend/net_instantsend.h>
#include <llmq/context.h> #include <llmq/context.h>
#include <llmq/dkgsessionmgr.h> #include <llmq/dkgsessionmgr.h>
#include <llmq/options.h> #include <llmq/options.h>
Expand Down Expand Up @@ -250,6 +251,9 @@ void Interrupt(NodeContext& node)
if (node.active_ctx) { if (node.active_ctx) {
node.active_ctx->Interrupt(); node.active_ctx->Interrupt();
} }
if (node.peerman) {
node.peerman->InterruptHandlers();
}
if (node.llmq_ctx) { if (node.llmq_ctx) {
node.llmq_ctx->Interrupt(); node.llmq_ctx->Interrupt();
} }
Expand Down Expand Up @@ -285,7 +289,10 @@ void PrepareShutdown(NodeContext& node)
StopREST(); StopREST();
StopRPC(); StopRPC();
StopHTTPServer(); StopHTTPServer();
if (node.peerman) node.peerman->RemoveHandlers();

if (node.active_ctx) node.active_ctx->Stop(); if (node.active_ctx) node.active_ctx->Stop();
if (node.peerman) node.peerman->StopHandlers();
if (node.llmq_ctx) node.llmq_ctx->Stop(); if (node.llmq_ctx) node.llmq_ctx->Stop();


for (const auto& client : node.chain_clients) { for (const auto& client : node.chain_clients) {
Expand Down Expand Up @@ -2191,6 +2198,7 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
g_active_notification_interface = std::make_unique<ActiveNotificationInterface>(*node.active_ctx, *node.mn_activeman); g_active_notification_interface = std::make_unique<ActiveNotificationInterface>(*node.active_ctx, *node.mn_activeman);
RegisterValidationInterface(g_active_notification_interface.get()); RegisterValidationInterface(g_active_notification_interface.get());
} }
node.peerman->AddExtraHandler(std::make_unique<NetInstantSend>(node.peerman.get(), *node.llmq_ctx->isman, *node.llmq_ctx->qman, chainman.ActiveChainstate()));


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


Expand Down Expand Up @@ -2286,6 +2294,7 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
// ********************************************************* Step 10a: schedule Dash-specific tasks // ********************************************************* Step 10a: schedule Dash-specific tasks


node.llmq_ctx->Start(*node.peerman); node.llmq_ctx->Start(*node.peerman);
node.peerman->StartHandlers();
if (node.active_ctx) node.active_ctx->Start(*node.connman, *node.peerman); if (node.active_ctx) node.active_ctx->Start(*node.connman, *node.peerman);


node.scheduler->scheduleEvery(std::bind(&CNetFulfilledRequestManager::DoMaintenance, std::ref(*node.netfulfilledman)), std::chrono::minutes{1}); node.scheduler->scheduleEvery(std::bind(&CNetFulfilledRequestManager::DoMaintenance, std::ref(*node.netfulfilledman)), std::chrono::minutes{1});
Expand Down
Loading
Loading