Changeset View
Changeset View
Standalone View
Standalone View
src/pow.cpp
// Copyright (c) 2009-2010 Satoshi Nakamoto | // Copyright (c) 2009-2010 Satoshi Nakamoto | ||||
// Copyright (c) 2009-2016 The Bitcoin Core developers | // Copyright (c) 2009-2016 The Bitcoin Core developers | ||||
// Copyright (c) 2017 The Bitcoin developers | // Copyright (c) 2017 The Bitcoin developers | ||||
// Distributed under the MIT software license, see the accompanying | // Distributed under the MIT software license, see the accompanying | ||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php. | // file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||||
#include "pow.h" | #include <pow.h> | ||||
#include "arith_uint256.h" | #include <arith_uint256.h> | ||||
#include "chain.h" | #include <chain.h> | ||||
#include "chainparams.h" | #include <chainparams.h> | ||||
#include "config.h" | #include <config.h> | ||||
#include "consensus/activation.h" | #include <consensus/activation.h> | ||||
#include "consensus/params.h" | #include <consensus/params.h> | ||||
#include "primitives/block.h" | #include <primitives/block.h> | ||||
#include "uint256.h" | #include <uint256.h> | ||||
#include "util.h" | #include <util.h> | ||||
/** | /** | ||||
* Compute the next required proof of work using the legacy Bitcoin difficulty | * Compute the next required proof of work using the legacy Bitcoin difficulty | ||||
* adjustment + Emergency Difficulty Adjustment (EDA). | * adjustment + Emergency Difficulty Adjustment (EDA). | ||||
*/ | */ | ||||
static uint32_t GetNextEDAWorkRequired(const CBlockIndex *pindexPrev, | static uint32_t GetNextEDAWorkRequired(const CBlockIndex *pindexPrev, | ||||
const CBlockHeader *pblock, | const CBlockHeader *pblock, | ||||
const Config &config) { | const Config &config) { | ||||
▲ Show 20 Lines • Show All 263 Lines • Show Last 20 Lines |