From ffd97afa0f5183e1f53b70a931b7f11f2ebd76fe Mon Sep 17 00:00:00 2001 From: jl777 Date: Wed, 10 Jul 2019 22:06:21 -1100 Subject: [PATCH] Test --- src/main.cpp | 38 ++++++++++++++++++++++++-------------- 1 file changed, 24 insertions(+), 14 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index d2b16b2a6..79822f93c 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -8466,21 +8466,31 @@ extern "C" const char* getDataDir() CMutableTransaction CreateNewContextualCMutableTransaction(const Consensus::Params& consensusParams, int nHeight) { CMutableTransaction mtx; - - bool isOverwintered = NetworkUpgradeActive(nHeight, consensusParams, Consensus::UPGRADE_OVERWINTER); - if (isOverwintered) { + if ( KOMODO_NSPV != 0 ) + { mtx.fOverwintered = true; - mtx.nExpiryHeight = nHeight + expiryDelta; - - if (NetworkUpgradeActive(nHeight, consensusParams, Consensus::UPGRADE_SAPLING)) { - mtx.nVersionGroupId = SAPLING_VERSION_GROUP_ID; - mtx.nVersion = SAPLING_TX_VERSION; - } else { - mtx.nVersionGroupId = OVERWINTER_VERSION_GROUP_ID; - mtx.nVersion = OVERWINTER_TX_VERSION; - mtx.nExpiryHeight = std::min( - mtx.nExpiryHeight, - static_cast(consensusParams.vUpgrades[Consensus::UPGRADE_SAPLING].nActivationHeight - 1)); + mtx.nExpiryHeight = 0; + mtx.nVersionGroupId = SAPLING_VERSION_GROUP_ID; + mtx.nVersion = SAPLING_TX_VERSION; + } + else + { + bool isOverwintered = NetworkUpgradeActive(nHeight, consensusParams, Consensus::UPGRADE_OVERWINTER); + if (isOverwintered) + { + mtx.fOverwintered = true; + mtx.nExpiryHeight = nHeight + expiryDelta; + if (NetworkUpgradeActive(nHeight, consensusParams, Consensus::UPGRADE_SAPLING)) + { + mtx.nVersionGroupId = SAPLING_VERSION_GROUP_ID; + mtx.nVersion = SAPLING_TX_VERSION; + } + else + { + mtx.nVersionGroupId = OVERWINTER_VERSION_GROUP_ID; + mtx.nVersion = OVERWINTER_TX_VERSION; + mtx.nExpiryHeight = std::min(mtx.nExpiryHeight,static_cast(consensusParams.vUpgrades[Consensus::UPGRADE_SAPLING].nActivationHeight - 1)); + } } } return mtx;