From b0b9565d6aaeb2032eaee3c5c9a21479bd414edd Mon Sep 17 00:00:00 2001 From: Duke Date: Sun, 21 Jan 2024 15:32:23 -0500 Subject: [PATCH] Sapling and Overwinter network upgrades are always active --- src/main.cpp | 14 +++++++------- src/miner.cpp | 3 ++- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index afb028115..ff708fbcf 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -931,8 +931,8 @@ unsigned int LimitOrphanTxSize(unsigned int nMaxOrphans) EXCLUSIVE_LOCKS_REQUIRE bool IsStandardTx(const CTransaction& tx, string& reason, const int nHeight) { - bool overwinterActive = NetworkUpgradeActive(nHeight, Params().GetConsensus(), Consensus::UPGRADE_OVERWINTER); - bool saplingActive = NetworkUpgradeActive(nHeight, Params().GetConsensus(), Consensus::UPGRADE_SAPLING); + bool overwinterActive = true; //NetworkUpgradeActive(nHeight, Params().GetConsensus(), Consensus::UPGRADE_OVERWINTER); + bool saplingActive = true; //NetworkUpgradeActive(nHeight, Params().GetConsensus(), Consensus::UPGRADE_SAPLING); if (saplingActive) { // Sapling standard rules apply @@ -1220,9 +1220,9 @@ bool ContextualCheckTransaction(int32_t slowflag,const CBlock *block, CBlockInde const int dosLevel, bool (*isInitBlockDownload)(),int32_t validateprices) { - bool overwinterActive = NetworkUpgradeActive(nHeight, Params().GetConsensus(), Consensus::UPGRADE_OVERWINTER); - bool saplingActive = NetworkUpgradeActive(nHeight, Params().GetConsensus(), Consensus::UPGRADE_SAPLING); - bool isSprout = !overwinterActive; + bool overwinterActive = true; //NetworkUpgradeActive(nHeight, Params().GetConsensus(), Consensus::UPGRADE_OVERWINTER); + bool saplingActive = true; //NetworkUpgradeActive(nHeight, Params().GetConsensus(), Consensus::UPGRADE_SAPLING); + bool isSprout = false; //!overwinterActive; // If Sprout rules apply, reject transactions which are intended for Overwinter and beyond if (isSprout && tx.fOverwintered) { @@ -5215,7 +5215,7 @@ bool ContextualCheckBlock(int32_t slowflag,const CBlock& block, CValidationState { const int nHeight = pindexPrev == NULL ? 0 : pindexPrev->GetHeight() + 1; const Consensus::Params& consensusParams = Params().GetConsensus(); - bool sapling = NetworkUpgradeActive(nHeight, consensusParams, Consensus::UPGRADE_SAPLING); + bool sapling = true; //NetworkUpgradeActive(nHeight, consensusParams, Consensus::UPGRADE_SAPLING); // Check that all transactions are finalized for (uint32_t i = 0; i < block.vtx.size(); i++) { @@ -8209,7 +8209,7 @@ CMutableTransaction CreateNewContextualCMutableTransaction(const Consensus::Para mtx.nVersionGroupId = SAPLING_VERSION_GROUP_ID; mtx.nVersion = SAPLING_TX_VERSION; } else { - bool isOverwintered = NetworkUpgradeActive(nHeight, consensusParams, Consensus::UPGRADE_OVERWINTER); + bool isOverwintered = true; //NetworkUpgradeActive(nHeight, consensusParams, Consensus::UPGRADE_OVERWINTER); if (isOverwintered) { mtx.fOverwintered = true; diff --git a/src/miner.cpp b/src/miner.cpp index 456c2637a..c7d6c500f 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -233,7 +233,8 @@ CBlockTemplate* CreateNewBlock(CPubKey _pk,const CScript& _scriptPubKeyIn, int32 const int nHeight = pindexPrev->GetHeight() + 1; const Consensus::Params &consensusParams = chainparams.GetConsensus(); uint32_t consensusBranchId = CurrentEpochBranchId(nHeight, consensusParams); - bool sapling = NetworkUpgradeActive(nHeight, consensusParams, Consensus::UPGRADE_SAPLING); + // Sapling NU is always active + bool sapling = true; //NetworkUpgradeActive(nHeight, consensusParams, Consensus::UPGRADE_SAPLING); const int64_t nMedianTimePast = pindexPrev->GetMedianTimePast(); uint32_t proposedTime = GetTime();