IsPegsImport() is always false
Since this function always returns false and is used in many "hot" code paths, removing it from the code should give us a performance boost.
This commit is contained in:
@@ -563,11 +563,6 @@ CAmount CCoinsViewCache::GetValueIn(int32_t nHeight,int64_t *interestp,const CTr
|
||||
return 0;
|
||||
for (unsigned int i = 0; i < tx.vin.size(); i++)
|
||||
{
|
||||
//if (tx.IsPegsImport() && i==0)
|
||||
//{
|
||||
// nResult = GetCoinImportValue(tx);
|
||||
// continue;
|
||||
//}
|
||||
value = GetOutputFor(tx.vin[i]).nValue;
|
||||
nResult += value;
|
||||
}
|
||||
@@ -599,7 +594,7 @@ bool CCoinsViewCache::HaveInputs(const CTransaction& tx) const
|
||||
{
|
||||
if (!tx.IsMint()) {
|
||||
for (unsigned int i = 0; i < tx.vin.size(); i++) {
|
||||
if (tx.IsPegsImport() && i==0) continue;
|
||||
//if (tx.IsPegsImport() && i==0) continue;
|
||||
const COutPoint &prevout = tx.vin[i].prevout;
|
||||
const CCoins* coins = AccessCoins(prevout.hash);
|
||||
if (!coins || !coins->IsAvailable(prevout.n)) {
|
||||
@@ -621,7 +616,7 @@ double CCoinsViewCache::GetPriority(const CTransaction &tx, int nHeight) const
|
||||
// use the maximum priority for all (partially or fully) shielded transactions.
|
||||
// (Note that coinbase transactions cannot contain Sapling shielded Spends or Outputs.)
|
||||
|
||||
if (tx.vShieldedSpend.size() > 0 || tx.vShieldedOutput.size() > 0 || tx.IsCoinImport() || tx.IsPegsImport()) {
|
||||
if (tx.vShieldedSpend.size() > 0 || tx.vShieldedOutput.size() > 0 || tx.IsCoinImport() ) { // || tx.IsPegsImport()) {
|
||||
return MAX_PRIORITY;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user