mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-10 03:47:29 -03:00
refactor: Fix timedata includes
This commit is contained in:
parent
aa9231fafe
commit
fad0fafd5a
10 changed files with 11 additions and 12 deletions
|
@ -11,15 +11,20 @@
|
|||
#include <flatfile.h>
|
||||
#include <kernel/cs_main.h>
|
||||
#include <primitives/block.h>
|
||||
#include <serialize.h>
|
||||
#include <sync.h>
|
||||
#include <uint256.h>
|
||||
#include <util/time.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
/**
|
||||
* Maximum amount of time that a block timestamp is allowed to exceed the
|
||||
* current network-adjusted time before the block will be accepted.
|
||||
* current time before the block will be accepted.
|
||||
*/
|
||||
static constexpr int64_t MAX_FUTURE_BLOCK_TIME = 2 * 60 * 60;
|
||||
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
#include <headerssync.h>
|
||||
#include <logging.h>
|
||||
#include <pow.h>
|
||||
#include <timedata.h>
|
||||
#include <util/check.h>
|
||||
#include <util/time.h>
|
||||
#include <util/vector.h>
|
||||
|
||||
// The two constants below are computed using the simulation script in
|
||||
|
|
|
@ -41,12 +41,12 @@
|
|||
#include <txrequest.h>
|
||||
#include <util/check.h>
|
||||
#include <util/strencodings.h>
|
||||
#include <util/time.h>
|
||||
#include <util/trace.h>
|
||||
#include <validation.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <atomic>
|
||||
#include <chrono>
|
||||
#include <future>
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
|
|
|
@ -20,8 +20,8 @@
|
|||
#include <policy/policy.h>
|
||||
#include <pow.h>
|
||||
#include <primitives/transaction.h>
|
||||
#include <timedata.h>
|
||||
#include <util/moneystr.h>
|
||||
#include <util/time.h>
|
||||
#include <validation.h>
|
||||
|
||||
#include <algorithm>
|
||||
|
|
|
@ -27,11 +27,11 @@
|
|||
#include <script/descriptor.h>
|
||||
#include <script/script.h>
|
||||
#include <script/signingprovider.h>
|
||||
#include <timedata.h>
|
||||
#include <txmempool.h>
|
||||
#include <univalue.h>
|
||||
#include <util/strencodings.h>
|
||||
#include <util/string.h>
|
||||
#include <util/time.h>
|
||||
#include <util/translation.h>
|
||||
#include <validation.h>
|
||||
#include <validationinterface.h>
|
||||
|
|
|
@ -12,7 +12,6 @@
|
|||
#include <policy/policy.h>
|
||||
#include <test/util/random.h>
|
||||
#include <test/util/txmempool.h>
|
||||
#include <timedata.h>
|
||||
#include <txmempool.h>
|
||||
#include <uint256.h>
|
||||
#include <util/strencodings.h>
|
||||
|
|
|
@ -44,7 +44,6 @@
|
|||
#include <test/util/net.h>
|
||||
#include <test/util/random.h>
|
||||
#include <test/util/txmempool.h>
|
||||
#include <timedata.h>
|
||||
#include <txdb.h>
|
||||
#include <txmempool.h>
|
||||
#include <util/chaintype.h>
|
||||
|
|
|
@ -15,7 +15,6 @@
|
|||
#include <test/util/random.h>
|
||||
#include <test/util/setup_common.h>
|
||||
#include <test/util/validation.h>
|
||||
#include <timedata.h>
|
||||
#include <uint256.h>
|
||||
#include <validation.h>
|
||||
#include <validationinterface.h>
|
||||
|
|
|
@ -5,11 +5,8 @@
|
|||
#ifndef BITCOIN_TIMEDATA_H
|
||||
#define BITCOIN_TIMEDATA_H
|
||||
|
||||
#include <util/time.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
#include <chrono>
|
||||
#include <cstdint>
|
||||
#include <vector>
|
||||
|
||||
|
|
|
@ -2188,7 +2188,7 @@ bool Chainstate::ConnectBlock(const CBlock& block, BlockValidationState& state,
|
|||
// Also, currently the rule against blocks more than 2 hours in the future
|
||||
// is enforced in ContextualCheckBlockHeader(); we wouldn't want to
|
||||
// re-enforce that rule here (at least until we make it impossible for
|
||||
// m_adjusted_time_callback() to go backward).
|
||||
// the clock to go backward).
|
||||
if (!CheckBlock(block, state, params.GetConsensus(), !fJustCheck, !fJustCheck)) {
|
||||
if (state.GetResult() == BlockValidationResult::BLOCK_MUTATED) {
|
||||
// We don't write down blocks to disk if they may have been
|
||||
|
|
Loading…
Reference in a new issue