|
|
@ -1224,6 +1224,7 @@ bool ContextualCheckTransaction(int32_t slowflag,const CBlock *block, CBlockInde |
|
|
|
const bool saplingActive = nHeight >=1 ? true : false; //NetworkUpgradeActive(nHeight, Params().GetConsensus(), Consensus::UPGRADE_SAPLING);
|
|
|
|
const bool isSprout = false; //!overwinterActive;
|
|
|
|
|
|
|
|
/*
|
|
|
|
// If Sprout rules apply, reject transactions which are intended for Overwinter and beyond
|
|
|
|
if (isSprout && tx.fOverwintered) { |
|
|
|
int32_t ht = Params().GetConsensus().vUpgrades[Consensus::UPGRADE_OVERWINTER].nActivationHeight; |
|
|
@ -3074,13 +3075,7 @@ bool DisconnectBlock(CBlock& block, CValidationState& state, CBlockIndex* pindex |
|
|
|
// However, this is only reliable if the last block was on or after
|
|
|
|
// the Sapling activation height. Otherwise, the last anchor was the
|
|
|
|
// empty root.
|
|
|
|
<<<<<<< HEAD |
|
|
|
const bool sapling = pindex->pprev->GetHeight() >= 1 ? true : false; // NetworkUpgradeActive(pindex->pprev->GetHeight(), Params().GetConsensus(), Consensus::UPGRADE_SAPLING);
|
|
|
|
||||||| merged common ancestors |
|
|
|
const bool sapling = true; // NetworkUpgradeActive(pindex->pprev->GetHeight(), Params().GetConsensus(), Consensus::UPGRADE_SAPLING);
|
|
|
|
======= |
|
|
|
const bool sapling = pindex->GetHeight() >= 2 ? true : false; // NetworkUpgradeActive(pindex->pprev->GetHeight(), Params().GetConsensus(), Consensus::UPGRADE_SAPLING);
|
|
|
|
>>>>>>> duke |
|
|
|
if (sapling) { |
|
|
|
view.PopAnchor(pindex->pprev->hashFinalSaplingRoot, SAPLING); |
|
|
|
} else { |
|
|
@ -3493,13 +3488,7 @@ bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pin |
|
|
|
|
|
|
|
// If Sapling is active, block.hashFinalSaplingRoot must be the
|
|
|
|
// same as the root of the Sapling tree
|
|
|
|
<<<<<<< HEAD |
|
|
|
const bool sapling = pindex->GetHeight()>=1 ? true : false; //NetworkUpgradeActive(pindex->GetHeight(), chainparams.GetConsensus(), Consensus::UPGRADE_SAPLING);
|
|
|
|
||||||| merged common ancestors |
|
|
|
const bool sapling = true; //NetworkUpgradeActive(pindex->GetHeight(), chainparams.GetConsensus(), Consensus::UPGRADE_SAPLING);
|
|
|
|
======= |
|
|
|
const bool sapling = pindex->GetHeight() >= 1 ? true : false; //NetworkUpgradeActive(pindex->GetHeight(), chainparams.GetConsensus(), Consensus::UPGRADE_SAPLING);
|
|
|
|
>>>>>>> duke |
|
|
|
if (sapling) { |
|
|
|
if (block.hashFinalSaplingRoot != sapling_tree.root()) { |
|
|
|
return state.DoS(100, |
|
|
@ -5225,16 +5214,8 @@ bool ContextualCheckBlockHeader(const CBlockHeader& block, CValidationState& sta |
|
|
|
bool ContextualCheckBlock(int32_t slowflag,const CBlock& block, CValidationState& state, CBlockIndex * const pindexPrev) |
|
|
|
{ |
|
|
|
const int nHeight = pindexPrev == NULL ? 0 : pindexPrev->GetHeight() + 1; |
|
|
|
<<<<<<< HEAD |
|
|
|
const Consensus::Params& consensusParams = Params().GetConsensus(); |
|
|
|
// bool sapling = nHeight>=1 ? true : false; //NetworkUpgradeActive(nHeight, consensusParams, Consensus::UPGRADE_SAPLING);
|
|
|
|
||||||| merged common ancestors |
|
|
|
const Consensus::Params& consensusParams = Params().GetConsensus(); |
|
|
|
bool sapling = true; //NetworkUpgradeActive(nHeight, consensusParams, Consensus::UPGRADE_SAPLING);
|
|
|
|
======= |
|
|
|
//const Consensus::Params& consensusParams = Params().GetConsensus();
|
|
|
|
//bool sapling = true; //NetworkUpgradeActive(nHeight, consensusParams, Consensus::UPGRADE_SAPLING);
|
|
|
|
>>>>>>> duke |
|
|
|
|
|
|
|
// Check that all transactions are finalized
|
|
|
|
for (uint32_t i = 0; i < block.vtx.size(); i++) { |
|
|
@ -8229,24 +8210,12 @@ CMutableTransaction CreateNewContextualCMutableTransaction(const Consensus::Para |
|
|
|
mtx.nVersionGroupId = SAPLING_VERSION_GROUP_ID; |
|
|
|
mtx.nVersion = SAPLING_TX_VERSION; |
|
|
|
} else { |
|
|
|
<<<<<<< HEAD |
|
|
|
const bool isOverwintered = nHeight>=1 ? true : false; //NetworkUpgradeActive(nHeight, consensusParams, Consensus::UPGRADE_OVERWINTER);
|
|
|
|
||||||| merged common ancestors |
|
|
|
bool isOverwintered = true; //NetworkUpgradeActive(nHeight, consensusParams, Consensus::UPGRADE_OVERWINTER);
|
|
|
|
======= |
|
|
|
const bool isOverwintered = nHeight >=1 ? true : false; //NetworkUpgradeActive(nHeight, consensusParams, Consensus::UPGRADE_OVERWINTER);
|
|
|
|
>>>>>>> duke |
|
|
|
if (isOverwintered) |
|
|
|
{ |
|
|
|
mtx.fOverwintered = true; |
|
|
|
mtx.nExpiryHeight = nHeight + expiryDelta; |
|
|
|
<<<<<<< HEAD |
|
|
|
const bool sapling = nHeight>=1 ? true : false; |
|
|
|
||||||| merged common ancestors |
|
|
|
const bool sapling = true; |
|
|
|
======= |
|
|
|
const bool sapling = nHeight >=1 ? true : false; |
|
|
|
>>>>>>> duke |
|
|
|
if (sapling) // NetworkUpgradeActive(nHeight, consensusParams, Consensus::UPGRADE_SAPLING))
|
|
|
|
{ |
|
|
|
mtx.nVersionGroupId = SAPLING_VERSION_GROUP_ID; |
|
|
|