Merge pull request #1129 from jl777/jl777

Jl777
This commit is contained in:
jl777
2018-12-29 01:40:37 -11:00
committed by GitHub
2 changed files with 32 additions and 1 deletions

View File

@@ -811,4 +811,4 @@ UniValue ChannelsInfo(uint256 channeltxid)
result.push_back(Pair("Error","Channel not found!"));
}
return(result);
}
}

View File

@@ -177,6 +177,37 @@ static void RegisterLoad(const std::string& strInput)
RegisterSetJson(key, valStr);
}
int32_t komodo_nextheight()
{
return(100000000);
}
// Set default values of new CMutableTransaction based on consensus rules at given height.
CMutableTransaction CreateNewContextualCMutableTransaction(const Consensus::Params& consensusParams, int nHeight)
{
CMutableTransaction mtx;
bool isOverwintered = NetworkUpgradeActive(nHeight, consensusParams, Consensus::UPGRADE_OVERWINTER);
if (isOverwintered) {
mtx.fOverwintered = true;
mtx.nExpiryHeight = nHeight + 60;
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;
}
static void MutateTxVersion(CMutableTransaction& tx, const std::string& cmdVal)
{
int64_t newVersion = atoi64(cmdVal);