Test
This commit is contained in:
38
src/main.cpp
38
src/main.cpp
@@ -8466,21 +8466,31 @@ extern "C" const char* getDataDir()
|
|||||||
CMutableTransaction CreateNewContextualCMutableTransaction(const Consensus::Params& consensusParams, int nHeight)
|
CMutableTransaction CreateNewContextualCMutableTransaction(const Consensus::Params& consensusParams, int nHeight)
|
||||||
{
|
{
|
||||||
CMutableTransaction mtx;
|
CMutableTransaction mtx;
|
||||||
|
if ( KOMODO_NSPV != 0 )
|
||||||
bool isOverwintered = NetworkUpgradeActive(nHeight, consensusParams, Consensus::UPGRADE_OVERWINTER);
|
{
|
||||||
if (isOverwintered) {
|
|
||||||
mtx.fOverwintered = true;
|
mtx.fOverwintered = true;
|
||||||
mtx.nExpiryHeight = nHeight + expiryDelta;
|
mtx.nExpiryHeight = 0;
|
||||||
|
mtx.nVersionGroupId = SAPLING_VERSION_GROUP_ID;
|
||||||
if (NetworkUpgradeActive(nHeight, consensusParams, Consensus::UPGRADE_SAPLING)) {
|
mtx.nVersion = SAPLING_TX_VERSION;
|
||||||
mtx.nVersionGroupId = SAPLING_VERSION_GROUP_ID;
|
}
|
||||||
mtx.nVersion = SAPLING_TX_VERSION;
|
else
|
||||||
} else {
|
{
|
||||||
mtx.nVersionGroupId = OVERWINTER_VERSION_GROUP_ID;
|
bool isOverwintered = NetworkUpgradeActive(nHeight, consensusParams, Consensus::UPGRADE_OVERWINTER);
|
||||||
mtx.nVersion = OVERWINTER_TX_VERSION;
|
if (isOverwintered)
|
||||||
mtx.nExpiryHeight = std::min(
|
{
|
||||||
mtx.nExpiryHeight,
|
mtx.fOverwintered = true;
|
||||||
static_cast<uint32_t>(consensusParams.vUpgrades[Consensus::UPGRADE_SAPLING].nActivationHeight - 1));
|
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<uint32_t>(consensusParams.vUpgrades[Consensus::UPGRADE_SAPLING].nActivationHeight - 1));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return mtx;
|
return mtx;
|
||||||
|
|||||||
Reference in New Issue
Block a user