Changeset View
Changeset View
Standalone View
Standalone View
src/pow/grasberg.h
- This file was added.
// Copyright (c) 2020 The Bitcoin developers | |||||
// Distributed under the MIT software license, see the accompanying | |||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php. | |||||
#ifndef BITCOIN_POW_GRASBERG_H | |||||
#define BITCOIN_POW_GRASBERG_H | |||||
#include <cstdint> | |||||
class CBlockHeader; | |||||
class CBlockIndex; | |||||
class CChainParams; | |||||
uint32_t GetNextGrasbergWorkRequired(const CBlockIndex *pindexPrev, | |||||
const CBlockHeader *pblock, | |||||
const CChainParams &chainParams); | |||||
namespace grasberg { | |||||
/** | |||||
* Compute the block time we are aiming for. | |||||
*/ | |||||
int64_t computeTargetBlockTime(const CBlockIndex *pindexPrev, | |||||
const CChainParams &chainParams); | |||||
/** | |||||
* Computes exp2(n) = 2^32 * (2^(n/2^32) - 1) | |||||
*/ | |||||
uint32_t deterministicExp2(uint32_t n); | |||||
} // namespace grasberg | |||||
#endif // BITCOIN_POW_GRASBERG_H |