aboutsummaryrefslogtreecommitdiff
path: root/src/net_processing.h
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2021-01-02 10:25:05 +0100
committerMarcoFalke <falke.marco@gmail.com>2021-01-02 10:24:45 +0100
commitfaaa4f2b6af4ce249fc4809a030240afa45b1a33 (patch)
tree3a2963ed2a2e2e3f5b34638f7913bc4e00010a1e /src/net_processing.h
parentae8f79713543d3db24a886cc27340b1570c2657d (diff)
downloadbitcoin-faaa4f2b6af4ce249fc4809a030240afa45b1a33.tar.xz
refactor: Remove nMyStartingHeight from CNode/Connman
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