From 4c6d41b8b653ef90639b1a32f6aab0bb1cef90c5 Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Thu, 10 Oct 2013 23:07:44 +0200 Subject: Refactor/encapsulate chain globals into a CChain class --- src/net.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/net.cpp') diff --git a/src/net.cpp b/src/net.cpp index 781dbfadca..4f77f42f9a 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))); @@ -1467,6 +1469,8 @@ void static StartSync(const vector &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 -- cgit v1.2.3