Fabcoin Core  0.16.2
P2P Digital Currency
params.h
Go to the documentation of this file.
1 // Copyright (c) 2009-2010 Satoshi Nakamoto
2 // Copyright (c) 2009-2017 The Bitcoin Core developers
3 // Distributed under the MIT software license, see the accompanying
4 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
5 
6 #ifndef FABCOIN_CONSENSUS_PARAMS_H
7 #define FABCOIN_CONSENSUS_PARAMS_H
8 
9 #include <uint256.h>
10 #include <map>
11 #include <string>
12 
13 namespace Consensus {
14 
16 {
18  DEPLOYMENT_CSV, // Deployment of BIP68, BIP112, and BIP113.
19  DEPLOYMENT_SEGWIT, // Deployment of BIP141, BIP143, and BIP147.
20  // NOTE: Also add new deployments to VersionBitsDeploymentInfo in versionbits.cpp
22 };
23 
29  int bit;
31  int64_t nStartTime;
33  int64_t nTimeout;
34 };
35 
39 struct Params {
40  std::string strNetworkID;
41 
52  uint32_t FABHeight;
54  uint32_t LWMAHeight;
56  uint32_t ContractHeight;
73 
77 
78  const uint256& PowLimit(bool postfork) const { return postfork ? powLimit : powLimitLegacy; }
83 
84  int64_t DifficultyAdjustmentInterval(uint32_t nheight=0) const { return nPowTargetTimespan / (nheight<EquihashFABHeight?nPowTargetSpacing:2*nPowTargetSpacing); }
87 
89 
90  // Params for Zawy's LWMA difficulty adjustment algorithm.
94 
95  //Digishield logic for difficulty adjustment
99  int64_t DigishieldAveragingWindowTimespan(uint32_t nheight=0) const { return nDigishieldPowAveragingWindow * (nheight<EquihashFABHeight?nPowTargetSpacing:2*nPowTargetSpacing); }
100  int64_t DigishieldMinActualTimespan(uint32_t nheight=0) const { return (DigishieldAveragingWindowTimespan(nheight) * (100 - nDigishieldPowMaxAdjustUp )) / 100; }
101  int64_t DigishieldMaxActualTimespan(uint32_t nheight=0) const { return (DigishieldAveragingWindowTimespan(nheight) * (100 + nDigishieldPowMaxAdjustDown)) / 100; }
102 
103 };
104 } // namespace Consensus
105 
106 #endif // FABCOIN_CONSENSUS_PARAMS_H
uint256 BIP34Hash
Definition: params.h:46
int64_t nPowTargetTimespan
Definition: params.h:81
bool fPowNoRetargeting
Definition: params.h:80
bool ForceSegwit
whether segwit is active
Definition: params.h:64
bool bZawyLwmaSolvetimeLimitation
Definition: params.h:92
bool fPowAllowMinDifficultyBlocks
Definition: params.h:79
int BIP66Height
Block height at which BIP66 becomes active.
Definition: params.h:50
int64_t nDigishieldPowMaxAdjustDown
Definition: params.h:97
int64_t DigishieldMaxActualTimespan(uint32_t nheight=0) const
Definition: params.h:101
const uint256 & PowLimit(bool postfork) const
Definition: params.h:78
uint32_t FABHeight
Block height at which Fabcoin Equihash hard fork becomes active.
Definition: params.h:52
int nFixUTXOCacheHFHeight
Definition: params.h:88
int nSubsidyHalvingInterval
Definition: params.h:43
uint256 powLimit
Proof of work parameters.
Definition: params.h:75
DeploymentPos
Definition: params.h:15
Struct for each individual consensus rule change using BIP9.
Definition: params.h:27
int BIP34Height
Block height and hash at which BIP34 becomes active.
Definition: params.h:45
int CoinbaseLock
Block height before which the coinbase subsidy will be locked for the same period.
Definition: params.h:62
int64_t nStartTime
Start MedianTime for version bits miner confirmation.
Definition: params.h:31
int64_t nPowTargetSpacing
Definition: params.h:82
uint32_t ContractHeight
Block height at which Fabcoin Smart Contract hard fork becomes active.
Definition: params.h:56
int64_t nDigishieldPowAveragingWindow
Definition: params.h:96
uint32_t nMinerConfirmationWindow
Definition: params.h:71
Parameters that influence chain consensus.
Definition: params.h:39
int64_t DifficultyAdjustmentInterval(uint32_t nheight=0) const
Definition: params.h:84
uint8_t MaxBlockInterval
Definition: params.h:93
int BIP65Height
Block height at which BIP65 becomes active.
Definition: params.h:48
std::string strNetworkID
Definition: params.h:40
int64_t nTimeout
Timeout/expiry MedianTime for the deployment attempt.
Definition: params.h:33
256-bit opaque blob.
Definition: uint256.h:132
uint256 nMinimumChainWork
Definition: params.h:85
uint256 defaultAssumeValid
Definition: params.h:86
int64_t MaxFutureBlockTime
Limit BITCOIN_MAX_FUTURE_BLOCK_TIME.
Definition: params.h:60
uint32_t EquihashFABHeight
Block height at which EquihashFAB (184,7) becomes active.
Definition: params.h:58
uint256 powLimitLegacy
Definition: params.h:76
uint32_t nRuleChangeActivationThreshold
Minimum blocks including miner confirmation of the total of 2016 blocks in a retargeting period...
Definition: params.h:70
int64_t DigishieldMinActualTimespan(uint32_t nheight=0) const
Definition: params.h:100
int64_t nDigishieldPowMaxAdjustUp
Definition: params.h:98
int bit
Bit position to select the particular bit in nVersion.
Definition: params.h:29
int64_t DigishieldAveragingWindowTimespan(uint32_t nheight=0) const
Definition: params.h:99
uint256 hashGenesisBlock
Definition: params.h:42
uint32_t LWMAHeight
Block height at which LWMA becomes active.
Definition: params.h:54
int64_t nZawyLwmaAveragingWindow
Definition: params.h:91