Merge bitcoin/bitcoin#35391: test: Use operator<< for time_points instead of manual TickSinceEpoch

fad4f417d1 test: Use operator<< for time_points instead of manual TickSinceEpoch (MarcoFalke)

Pull request description:

  This partially reverts the changes from commit 020166080c to testnet4_miner_tests.cpp

  Also, remove some confusing IWYU pragmas. Those were inconsistently added in 8c58f63578, but without any rationale why adding them is the correct approach. The correct approach should be done in a proper follow-up, with a clear rationale.

ACKs for top commit:
  Sjors:
    ACK fad4f417d1
  sedited:
    ACK fad4f417d1

Tree-SHA512: d88813d5c294b07a567a952c9f4b5351b005ebf1dbd8f31988f922d6d3bd6916cc1553f0d90e23cfaa4517906df176971feb5bc8a7de1938e7896cbe40fe6661
This commit is contained in:
merge-script
2026-05-27 12:42:24 +01:00
5 changed files with 6 additions and 6 deletions

View File

@@ -19,7 +19,7 @@
#include <script/script.h>
#include <sync.h>
#include <test/util/blockfilter.h>
#include <test/util/common.h> // IWYU pragma: keep
#include <test/util/common.h>
#include <test/util/setup_common.h>
#include <tinyformat.h>
#include <uint256.h>

View File

@@ -6,7 +6,7 @@
#include <consensus/amount.h>
#include <consensus/consensus.h>
#include <consensus/validation.h>
#include <node/mining_types.h> // IWYU pragma: keep
#include <node/mining_types.h>
#include <policy/feerate.h>
#include <policy/packages.h>
#include <policy/policy.h>

View File

@@ -7,6 +7,7 @@
#include <node/mining_types.h>
#include <primitives/block.h>
#include <sync.h>
#include <test/util/common.h>
#include <test/util/setup_common.h>
#include <test/util/time.h>
#include <util/time.h>
@@ -47,8 +48,7 @@ BOOST_AUTO_TEST_CASE(MiningInterface)
BOOST_REQUIRE(block_template);
// The template should use the mocked system time
BOOST_REQUIRE_EQUAL(TicksSinceEpoch<std::chrono::seconds>(block_template->getBlockHeader().Time()),
TicksSinceEpoch<std::chrono::seconds>(template_time));
BOOST_REQUIRE_EQUAL(block_template->getBlockHeader().Time(), template_time);
const BlockWaitOptions wait_options{.timeout = MillisecondsDouble{0}, .fee_threshold = 1};

View File

@@ -15,7 +15,7 @@
#include <random.h>
#include <script/script.h>
#include <sync.h>
#include <test/util/common.h> // IWYU pragma: keep
#include <test/util/common.h>
#include <test/util/script.h>
#include <test/util/setup_common.h>
#include <txmempool.h>

View File

@@ -15,8 +15,8 @@
#include <script/script.h>
#include <sync.h>
#include <test/util/chainstate.h>
#include <test/util/common.h> // IWYU pragma: keep
#include <test/util/coins.h>
#include <test/util/common.h>
#include <test/util/setup_common.h>
#include <tinyformat.h>
#include <uint256.h>