mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
Merge 338b9d82dc into merged_master (Bitcoin PR bitcoin/bitcoin#30681)
This commit is contained in:
commit
f60016e6ad
8 changed files with 73 additions and 11 deletions
|
|
@ -114,13 +114,6 @@ const std::vector<std::string> CHECKLEVEL_DOC {
|
|||
* */
|
||||
static constexpr int PRUNE_LOCK_BUFFER{10};
|
||||
|
||||
/**
|
||||
* Maximum number of seconds that the timestamp of the first
|
||||
* block of a difficulty adjustment period is allowed to
|
||||
* be earlier than the last block of the previous period (BIP94).
|
||||
*/
|
||||
static constexpr int64_t MAX_TIMEWARP = 600;
|
||||
|
||||
GlobalMutex g_best_block_mutex;
|
||||
std::condition_variable g_best_block_cv;
|
||||
uint256 g_best_block;
|
||||
|
|
@ -4775,7 +4768,7 @@ static bool ContextualCheckBlockHeader(const CBlockHeader& block, BlockValidatio
|
|||
return state.Invalid(BlockValidationResult::BLOCK_INVALID_HEADER, "bad-header-height");
|
||||
}
|
||||
|
||||
// Testnet4 only: Check timestamp against prev for difficulty-adjustment
|
||||
// Testnet4 and regtest only: Check timestamp against prev for difficulty-adjustment
|
||||
// blocks to prevent timewarp attacks (see https://github.com/bitcoin/bitcoin/pull/15482).
|
||||
if (consensusParams.enforce_BIP94) {
|
||||
// Check timestamp for the first block of each difficulty adjustment
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue