aboutsummaryrefslogtreecommitdiff
path: root/src/net_processing.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/net_processing.h')
-rw-r--r--src/net_processing.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/net_processing.h b/src/net_processing.h
index b8caa4369c..4f2a779f68 100644
--- a/src/net_processing.h
+++ b/src/net_processing.h
@@ -160,8 +160,11 @@ public:
/** Get statistics from node state */
bool GetNodeStateStats(NodeId nodeid, CNodeStateStats& stats);
+ /** Set the best height */
+ void SetBestHeight(int height) { m_best_height = height; };
+
/** Whether this node ignores txs received over p2p. */
- bool IgnoresIncomingTxs() {return m_ignore_incoming_txs;};
+ bool IgnoresIncomingTxs() { return m_ignore_incoming_txs; };
private:
/** Get a shared pointer to the Peer object.
@@ -224,9 +227,12 @@ private:
CTxMemPool& m_mempool;
TxRequestTracker m_txrequest GUARDED_BY(::cs_main);
+ /** The height of the best chain */
+ std::atomic<int> m_best_height{-1};
+
int64_t m_stale_tip_check_time; //!< Next time to check for stale tip
- //* Whether this node is running in blocks only mode */
+ /** Whether this node is running in blocks only mode */
const bool m_ignore_incoming_txs;
/** Whether we've completed initial sync yet, for determining when to turn