Merge bitcoin-core/gui#919: move-only: MAX_BLOCK_TIME_GAP to src/qt

fa5ed16aa4 move-only: MAX_BLOCK_TIME_GAP to src/qt (MarcoFalke)

Pull request description:

  `MAX_BLOCK_TIME_GAP` was used in some incorrect heuristics, which were removed in commit e30b6ea194.

  This leaves a single module in src/qt using the constant.

  Instead of exposing it in a central kernel header, just move it to the single gui module that uses it.

ACKs for top commit:
  sedited:
    ACK fa5ed16aa4
  hebasto:
    ACK fa5ed16aa4, I have reviewed the code and it looks OK.

Tree-SHA512: d0e0e5257f6585d793bfed118d61a3e5d56b2be397fa3b09b34db64e3e018eba9f223cd56541d258b422119fdd7501f07cd3bb8ad5dc28b535922aa21ea76fa6
This commit is contained in:
Hennadii Stepanov
2025-12-17 17:11:54 +00:00
2 changed files with 8 additions and 8 deletions

View File

@@ -39,14 +39,6 @@ static constexpr int64_t TIMESTAMP_WINDOW = MAX_FUTURE_BLOCK_TIME;
static constexpr int32_t SEQ_ID_BEST_CHAIN_FROM_DISK = 0;
static constexpr int32_t SEQ_ID_INIT_FROM_DISK = 1;
/**
* Maximum gap between node time and block time used
* for the "Catching up..." mode in GUI.
*
* Ref: https://github.com/bitcoin/bitcoin/pull/1026
*/
static constexpr int64_t MAX_BLOCK_TIME_GAP = 90 * 60;
enum BlockStatus : uint32_t {
//! Unused.
BLOCK_VALID_UNKNOWN = 0,

View File

@@ -72,6 +72,14 @@
#include <QWindow>
/**
* Maximum gap between node time and block time used
* for the "Catching up..." mode in GUI.
*
* Ref: https://github.com/bitcoin/bitcoin/pull/1026
*/
static constexpr int64_t MAX_BLOCK_TIME_GAP = 90 * 60;
const std::string BitcoinGUI::DEFAULT_UIPLATFORM =
#if defined(Q_OS_MACOS)
"macosx"