diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2016-10-18 22:34:13 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2016-10-18 22:48:51 +0200 |
commit | 05998da5a7e2be6af0ecb53f4f645464646175ef (patch) | |
tree | 5b8aca3a9bbc7256e0e4909b63e3e77abd58c139 /src/init.cpp | |
parent | 23e03f8d26d7bd03273a5dcbdcfe3905dfb49ffb (diff) | |
parent | a9aec5c24d8c4efe9e1ede54e8b8039b4b3f0835 (diff) |
Merge #8865: Decouple peer-processing-logic from block-connection-logic
a9aec5c Use BlockChecked signal to send reject messages from mapBlockSource (Matt Corallo)
7565e03 Remove SyncWithWallets wrapper function (Matt Corallo)
12ee1fe Always call UpdatedBlockTip, even if blocks were only disconnected (Matt Corallo)
f5efa28 Remove CConnman parameter from ProcessNewBlock/ActivateBestChain (Matt Corallo)
fef1010 Use CValidationInterface from chain logic to notify peer logic (Matt Corallo)
aefcb7b Move net-processing logic definitions together in main.h (Matt Corallo)
0278fb5 Remove duplicate nBlocksEstimate cmp (we already checked IsIBD()) (Matt Corallo)
87e7d72 Make validationinterface.UpdatedBlockTip more verbose (Matt Corallo)
Diffstat (limited to 'src/init.cpp')
-rw-r--r-- | src/init.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/init.cpp b/src/init.cpp index 685188c458..2b1fbed072 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -72,6 +72,7 @@ static const bool DEFAULT_DISABLE_SAFEMODE = false; static const bool DEFAULT_STOPAFTERBLOCKIMPORT = false; std::unique_ptr<CConnman> g_connman; +std::unique_ptr<PeerLogicValidation> peerLogic; #if ENABLE_ZMQ static CZMQNotificationInterface* pzmqNotificationInterface = NULL; @@ -200,6 +201,8 @@ void Shutdown() pwalletMain->Flush(false); #endif MapPort(false); + UnregisterValidationInterface(peerLogic.get()); + peerLogic.reset(); g_connman.reset(); StopTorControl(); @@ -1102,6 +1105,8 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) g_connman = std::unique_ptr<CConnman>(new CConnman(GetRand(std::numeric_limits<uint64_t>::max()), GetRand(std::numeric_limits<uint64_t>::max()))); CConnman& connman = *g_connman; + peerLogic.reset(new PeerLogicValidation(&connman)); + RegisterValidationInterface(peerLogic.get()); RegisterNodeSignals(GetNodeSignals()); // sanitize comments per BIP-0014, format user agent and check total size |