diff options
author | Cory Fields <cory-nospam-@coryfields.com> | 2017-07-06 13:40:09 -0400 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2017-11-02 13:16:28 -0400 |
commit | dc897e53d8a6c29016a19c862ddd0b656ae8de3f (patch) | |
tree | 6ee77baaf72f7d5fa09cc05d717816736cd9a598 /src/init.cpp | |
parent | 8aee55af3d21fb79edf148e42c3bd10bf80f7ec8 (diff) | |
download | bitcoin-dc897e53d8a6c29016a19c862ddd0b656ae8de3f.tar.xz |
net: use an interface class rather than signals for message processing
Drop boost signals in favor of a stateful class. This will allow the message
processing loop to actually move to net_processing in a future step.
Github-Pull: #10756
Rebased-From: 8ad663c1fa88d68843e45580deced56112343183
Diffstat (limited to 'src/init.cpp')
-rw-r--r-- | src/init.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/init.cpp b/src/init.cpp index c9bb827f82..62250664e3 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -194,11 +194,10 @@ void Shutdown() #endif MapPort(false); UnregisterValidationInterface(peerLogic.get()); - peerLogic.reset(); g_connman.reset(); + peerLogic.reset(); StopTorControl(); - UnregisterNodeSignals(GetNodeSignals()); if (fDumpMempoolLater && gArgs.GetArg("-persistmempool", DEFAULT_PERSIST_MEMPOOL)) { DumpMempool(); } @@ -1277,7 +1276,6 @@ bool AppInitMain(boost::thread_group& threadGroup, CScheduler& scheduler) peerLogic.reset(new PeerLogicValidation(&connman)); RegisterValidationInterface(peerLogic.get()); - RegisterNodeSignals(GetNodeSignals()); // sanitize comments per BIP-0014, format user agent and check total size std::vector<std::string> uacomments; @@ -1668,6 +1666,7 @@ bool AppInitMain(boost::thread_group& threadGroup, CScheduler& scheduler) connOptions.nMaxFeeler = 1; connOptions.nBestHeight = chainActive.Height(); connOptions.uiInterface = &uiInterface; + connOptions.m_msgproc = peerLogic.get(); connOptions.nSendBufferMaxSize = 1000*gArgs.GetArg("-maxsendbuffer", DEFAULT_MAXSENDBUFFER); connOptions.nReceiveFloodSize = 1000*gArgs.GetArg("-maxreceivebuffer", DEFAULT_MAXRECEIVEBUFFER); |