Files

74 lines
2.3 KiB
C++

/*
* This file is part of the Flowee project
* Copyright (C) 2009-2010 Satoshi Nakamoto
* Copyright (C) 2009-2015 The Bitcoin Core developers
* Copyright (C) 2019-2020 Tom Zander <tom@flowee.org>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef FLOWEE_CONSENSUS_PARAMS_H
#define FLOWEE_CONSENSUS_PARAMS_H
#include "uint256.h"
namespace Consensus {
/**
* Parameters that influence chain consensus.
*/
struct Params {
uint256 hashGenesisBlock;
int nSubsidyHalvingInterval;
/** Block height and hash at which BIP34 becomes active */
int BIP34Height;
int BIP65Height; // CHECKLOCKTIMEVERIFY
int BIP66Height; // DERSIG
int BIP68Height; // sequence locks
/**
* Minimum blocks including miner confirmation of the total of 2016 blocks in a retargetting period,
* (nPowTargetTimespan / nPowTargetSpacing) which is also used for BIP9 deployments.
* Examples: 1916 for 95%, 1512 for testchains.
*/
uint32_t nRuleChangeActivationThreshold;
uint32_t nMinerConfirmationWindow;
/** Proof of work parameters */
uint256 powLimit;
bool fPowAllowMinDifficultyBlocks;
bool fPowNoRetargeting;
int64_t nPowTargetSpacing;
int64_t nPowTargetTimespan;
int64_t nASERTHalfLife;
int64_t DifficultyAdjustmentInterval() const { return nPowTargetTimespan / nPowTargetSpacing; }
// BCH Protocol upgrades.
int hf201708Height; // EDA
int hf201711Height; // cw144 DAA got enabled here
int hf201805Height;
int hf201811Height;
int hf201905Height;
int hf201911Height;
int hf202005Height;
int hf202011Height; // asert DAA
int hf202205Height;
int hf202305Height;
int hf202405Height;
int hf202505Height;
int64_t hf202605ActivationTime;
};
} // namespace Consensus
#endif