Sapling and Overwinter network upgrades are always active
These NU's are always active for Hush Arrakis Chains so this code only serves to slow down all operations by constantly being checked. So we disable them which will speed up syncing, mining and creating transactions.
This commit is contained in:
@@ -2787,7 +2787,8 @@ int CWallet::ScanForWalletTransactions(CBlockIndex* pindexStart, bool fUpdate)
|
||||
// This should never fail: we should always be able to get the tree
|
||||
// state on the path to the tip of our chain
|
||||
if (pindex->pprev) {
|
||||
if (NetworkUpgradeActive(pindex->pprev->GetHeight(), Params().GetConsensus(), Consensus::UPGRADE_SAPLING)) {
|
||||
const bool sapling = true;
|
||||
if (sapling) { // NetworkUpgradeActive(pindex->pprev->GetHeight(), Params().GetConsensus(), Consensus::UPGRADE_SAPLING)) {
|
||||
assert(pcoinsTip->GetSaplingAnchorAt(pindex->pprev->hashFinalSaplingRoot, saplingTree));
|
||||
}
|
||||
}
|
||||
@@ -3687,7 +3688,8 @@ bool CWallet::CreateTransaction(const vector<CRecipient>& vecSend, CWalletTx& wt
|
||||
txNew.nLockTime = (uint32_t)chainActive.Tip()->GetMedianTimePast();
|
||||
|
||||
// Activates after Overwinter network upgrade
|
||||
if (NetworkUpgradeActive(nextBlockHeight, Params().GetConsensus(), Consensus::UPGRADE_OVERWINTER)) {
|
||||
const bool overwinter = true;
|
||||
if (overwinter) { // NetworkUpgradeActive(nextBlockHeight, Params().GetConsensus(), Consensus::UPGRADE_OVERWINTER)) {
|
||||
if (txNew.nExpiryHeight >= TX_EXPIRY_HEIGHT_THRESHOLD){
|
||||
strFailReason = _("nExpiryHeight must be less than TX_EXPIRY_HEIGHT_THRESHOLD.");
|
||||
return false;
|
||||
@@ -3695,9 +3697,11 @@ bool CWallet::CreateTransaction(const vector<CRecipient>& vecSend, CWalletTx& wt
|
||||
}
|
||||
|
||||
unsigned int max_tx_size = MAX_TX_SIZE_AFTER_SAPLING;
|
||||
/* Sapling is always active
|
||||
if (!NetworkUpgradeActive(nextBlockHeight, Params().GetConsensus(), Consensus::UPGRADE_SAPLING)) {
|
||||
max_tx_size = MAX_TX_SIZE_BEFORE_SAPLING;
|
||||
}
|
||||
*/
|
||||
/*
|
||||
// Discourage fee sniping.
|
||||
//
|
||||
@@ -3891,14 +3895,17 @@ bool CWallet::CreateTransaction(const vector<CRecipient>& vecSend, CWalletTx& wt
|
||||
txNew.vin.push_back(CTxIn(coin.first->GetHash(),coin.second,CScript(),
|
||||
std::numeric_limits<unsigned int>::max()-1));
|
||||
|
||||
// All Hush Arrakis Chains always have overwinter NU and so this option was never used
|
||||
// Check mempooltxinputlimit to avoid creating a transaction which the local mempool rejects
|
||||
size_t limit = (size_t)GetArg("-mempooltxinputlimit", 0);
|
||||
// const size_t limit = 0; // (size_t)GetArg("-mempooltxinputlimit", 0);
|
||||
{
|
||||
LOCK(cs_main);
|
||||
if (NetworkUpgradeActive(chainActive.Height() + 1, Params().GetConsensus(), Consensus::UPGRADE_OVERWINTER)) {
|
||||
limit = 0;
|
||||
}
|
||||
const bool overwinter = true;
|
||||
//if (NetworkUpgradeActive(chainActive.Height() + 1, Params().GetConsensus(), Consensus::UPGRADE_OVERWINTER)) {
|
||||
// limit = 0;
|
||||
//}
|
||||
}
|
||||
/*
|
||||
if (limit > 0) {
|
||||
size_t n = txNew.vin.size();
|
||||
if (n > limit) {
|
||||
@@ -3906,6 +3913,7 @@ bool CWallet::CreateTransaction(const vector<CRecipient>& vecSend, CWalletTx& wt
|
||||
return false;
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
// Grab the current consensus branch ID
|
||||
auto consensusBranchId = CurrentEpochBranchId(chainActive.Height() + 1, Params().GetConsensus());
|
||||
|
||||
Reference in New Issue
Block a user