mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 06:28:31 +01:00
Track headers presync progress and log it
This commit is contained in:
committed by
Suhas Daftuar
parent
03712dddfb
commit
355547334f
@@ -868,6 +868,9 @@ private:
|
||||
bool min_pow_checked) EXCLUSIVE_LOCKS_REQUIRED(cs_main);
|
||||
friend CChainState;
|
||||
|
||||
/** Most recent headers presync progress update, for rate-limiting. */
|
||||
std::chrono::time_point<std::chrono::steady_clock> m_last_presync_update GUARDED_BY(::cs_main) {};
|
||||
|
||||
public:
|
||||
using Options = kernel::ChainstateManagerOpts;
|
||||
|
||||
@@ -1046,6 +1049,12 @@ public:
|
||||
/** Produce the necessary coinbase commitment for a block (modifies the hash, don't call for mined blocks). */
|
||||
std::vector<unsigned char> GenerateCoinbaseCommitment(CBlock& block, const CBlockIndex* pindexPrev) const;
|
||||
|
||||
/** This is used by net_processing to report pre-synchronization progress of headers, as
|
||||
* headers are not yet fed to validation during that time, but validation is (for now)
|
||||
* responsible for logging and signalling through NotifyHeaderTip, so it needs this
|
||||
* information. */
|
||||
void ReportHeadersPresync(const arith_uint256& work, int64_t height, int64_t timestamp);
|
||||
|
||||
~ChainstateManager();
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user