|
87 | 87 | #include <flat-database.h> |
88 | 88 | #include <governance/governance.h> |
89 | 89 | #include <instantsend/instantsend.h> |
| 90 | +#include <instantsend/net_instantsend.h> |
90 | 91 | #include <llmq/context.h> |
91 | 92 | #include <llmq/dkgsessionmgr.h> |
92 | 93 | #include <llmq/options.h> |
@@ -250,6 +251,9 @@ void Interrupt(NodeContext& node) |
250 | 251 | if (node.active_ctx) { |
251 | 252 | node.active_ctx->Interrupt(); |
252 | 253 | } |
| 254 | + if (node.peerman) { |
| 255 | + node.peerman->InterruptHandlers(); |
| 256 | + } |
253 | 257 | if (node.llmq_ctx) { |
254 | 258 | node.llmq_ctx->Interrupt(); |
255 | 259 | } |
@@ -285,7 +289,9 @@ void PrepareShutdown(NodeContext& node) |
285 | 289 | StopREST(); |
286 | 290 | StopRPC(); |
287 | 291 | StopHTTPServer(); |
| 292 | + |
288 | 293 | if (node.active_ctx) node.active_ctx->Stop(); |
| 294 | + if (node.peerman) node.peerman->StopHandlers(); |
289 | 295 | if (node.llmq_ctx) node.llmq_ctx->Stop(); |
290 | 296 |
|
291 | 297 | for (const auto& client : node.chain_clients) { |
@@ -2193,6 +2199,7 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info) |
2193 | 2199 | g_active_notification_interface = std::make_unique<ActiveNotificationInterface>(*node.active_ctx, *node.mn_activeman); |
2194 | 2200 | RegisterValidationInterface(g_active_notification_interface.get()); |
2195 | 2201 | } |
| 2202 | + node.peerman->AddExtraHandler(std::make_unique<NetInstantSend>(node.peerman.get(), *node.llmq_ctx->isman, *node.llmq_ctx->qman, chainman.ActiveChainstate())); |
2196 | 2203 |
|
2197 | 2204 | // ********************************************************* Step 7d: Setup other Dash services |
2198 | 2205 |
|
@@ -2288,6 +2295,7 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info) |
2288 | 2295 | // ********************************************************* Step 10a: schedule Dash-specific tasks |
2289 | 2296 |
|
2290 | 2297 | node.llmq_ctx->Start(*node.peerman); |
| 2298 | + node.peerman->StartHandlers(); |
2291 | 2299 | if (node.active_ctx) node.active_ctx->Start(*node.connman, *node.peerman); |
2292 | 2300 |
|
2293 | 2301 | node.scheduler->scheduleEvery(std::bind(&CNetFulfilledRequestManager::DoMaintenance, std::ref(*node.netfulfilledman)), std::chrono::minutes{1}); |
|
0 commit comments