mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-05-27 22:34:18 +02:00
Merge bitcoin/bitcoin#35391: test: Use operator<< for time_points instead of manual TickSinceEpoch
fad4f417d1test: Use operator<< for time_points instead of manual TickSinceEpoch (MarcoFalke) Pull request description: This partially reverts the changes from commit020166080cto testnet4_miner_tests.cpp Also, remove some confusing IWYU pragmas. Those were inconsistently added in8c58f63578, 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: ACKfad4f417d1sedited: ACKfad4f417d1Tree-SHA512: d88813d5c294b07a567a952c9f4b5351b005ebf1dbd8f31988f922d6d3bd6916cc1553f0d90e23cfaa4517906df176971feb5bc8a7de1938e7896cbe40fe6661
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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};
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user