diff options
author | Gavin Andresen <gavinandresen@gmail.com> | 2013-10-14 20:39:00 -0700 |
---|---|---|
committer | Gavin Andresen <gavinandresen@gmail.com> | 2013-10-14 20:39:00 -0700 |
commit | b9beea6e9d0f789f11d249b040e549d535bdc295 (patch) | |
tree | e87c3422b52b1f6d78b88b9cea756c1f3cb8d37b /src/net.cpp | |
parent | ae6601872be4065f90713b9b6ef07e9883afec79 (diff) | |
parent | 4c6d41b8b653ef90639b1a32f6aab0bb1cef90c5 (diff) |
Merge pull request #3077 from sipa/chain
Refactor/encapsulate chain globals into a CChain class
Diffstat (limited to 'src/net.cpp')
-rw-r--r-- | src/net.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/net.cpp b/src/net.cpp index 5afedb1fd2..5d6f1f46a8 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -540,6 +540,8 @@ void CNode::Cleanup() void CNode::PushVersion() { + int nBestHeight = g_signals.GetHeight().get_value_or(0); + /// when NTP implemented, change to just nTime = GetAdjustedTime() int64 nTime = (fInbound ? GetAdjustedTime() : GetTime()); CAddress addrYou = (addr.IsRoutable() && !IsProxy(addr) ? addr : CAddress(CService("0.0.0.0",0))); @@ -1482,6 +1484,8 @@ void static StartSync(const vector<CNode*> &vNodes) { CNode *pnodeNewSync = NULL; double dBestScore = 0; + int nBestHeight = g_signals.GetHeight().get_value_or(0); + // Iterate over all nodes BOOST_FOREACH(CNode* pnode, vNodes) { // check preconditions for allowing a sync |