diff --git a/src/node/miner.h b/src/node/miner.h --- a/src/node/miner.h +++ b/src/node/miner.h @@ -51,7 +51,7 @@ iter = entry; nSizeWithAncestors = entry->GetSizeWithAncestors(); nModFeesWithAncestors = entry->GetModFeesWithAncestors(); - nSigOpCountWithAncestors = entry->GetSigOpCountWithAncestors(); + nSigChecksWithAncestors = entry->GetSigChecksWithAncestors(); } Amount GetModifiedFee() const { return iter->GetModifiedFee(); } @@ -65,7 +65,7 @@ CTxMemPool::txiter iter; uint64_t nSizeWithAncestors; Amount nModFeesWithAncestors; - int64_t nSigOpCountWithAncestors; + int64_t nSigChecksWithAncestors; }; /** @@ -125,7 +125,7 @@ void operator()(CTxMemPoolModifiedEntry &e) { e.nModFeesWithAncestors -= iter->GetFee(); e.nSizeWithAncestors -= iter->GetTxSize(); - e.nSigOpCountWithAncestors -= iter->GetSigOpCount(); + e.nSigChecksWithAncestors -= iter->GetSigChecks(); } CTxMemPool::txiter iter; diff --git a/src/node/miner.cpp b/src/node/miner.cpp --- a/src/node/miner.cpp +++ b/src/node/miner.cpp @@ -50,7 +50,7 @@ uint64_t CTxMemPoolModifiedEntry::GetVirtualSizeWithAncestors() const { return GetVirtualTransactionSize(nSizeWithAncestors, - nSigOpCountWithAncestors); + nSigChecksWithAncestors); } BlockAssembler::Options::Options() @@ -301,10 +301,10 @@ void BlockAssembler::AddToBlock(CTxMemPool::txiter iter) { pblocktemplate->entries.emplace_back(iter->GetSharedTx(), iter->GetFee(), - iter->GetSigOpCount()); + iter->GetSigChecks()); nBlockSize += iter->GetTxSize(); ++nBlockTx; - nBlockSigOps += iter->GetSigOpCount(); + nBlockSigOps += iter->GetSigChecks(); nFees += iter->GetFee(); inBlock.insert(iter); @@ -337,7 +337,7 @@ CTxMemPoolModifiedEntry modEntry(desc); modEntry.nSizeWithAncestors -= it->GetTxSize(); modEntry.nModFeesWithAncestors -= it->GetModifiedFee(); - modEntry.nSigOpCountWithAncestors -= it->GetSigOpCount(); + modEntry.nSigChecksWithAncestors -= it->GetSigChecks(); mapModifiedTx.insert(modEntry); } else { mapModifiedTx.modify(mit, update_for_parent_inclusion(it)); @@ -355,7 +355,7 @@ // and it fails: we can then potentially consider it again while walking mapTx. // It's currently guaranteed to fail again, but as a belt-and-suspenders check // we put it in failedTx and avoid re-evaluation, since the re-evaluation would -// be using cached size/sigops/fee values that are not actually correct. +// be using cached size/sigChecks/fee values that are not actually correct. bool BlockAssembler::SkipMapTxEntry( CTxMemPool::txiter it, indexed_modified_transaction_set &mapModifiedTx, CTxMemPool::setEntries &failedTx) { @@ -457,11 +457,11 @@ uint64_t packageSize = iter->GetSizeWithAncestors(); Amount packageFees = iter->GetModFeesWithAncestors(); - int64_t packageSigOps = iter->GetSigOpCountWithAncestors(); + int64_t packageSigOps = iter->GetSigChecksWithAncestors(); if (fUsingModified) { packageSize = modit->nSizeWithAncestors; packageFees = modit->nModFeesWithAncestors; - packageSigOps = modit->nSigOpCountWithAncestors; + packageSigOps = modit->nSigChecksWithAncestors; } if (packageFees < blockMinFeeRate.GetFee(packageSize)) { diff --git a/src/test/mempool_tests.cpp b/src/test/mempool_tests.cpp --- a/src/test/mempool_tests.cpp +++ b/src/test/mempool_tests.cpp @@ -35,7 +35,7 @@ parentOfAll.vout.emplace_back(10 * SATOSHI, CScript() << OP_TRUE); } TxId parentOfAllId = parentOfAll.GetId(); - testPool.addUnchecked(entry.SigOpCount(0).FromTx(parentOfAll)); + testPool.addUnchecked(entry.SigChecks(0).FromTx(parentOfAll)); // Add some outpoints to the tracking vector for (size_t i = 0; i < maxOutputs; i++) { @@ -45,7 +45,7 @@ Amount totalFee = Amount::zero(); size_t totalSize = CTransaction(parentOfAll).GetTotalSize(); size_t totalVirtualSize = totalSize; - int64_t totalSigOpCount = 0; + int64_t totalSigChecks = 0; // Generate 100 transactions for (size_t totalTransactions = 0; totalTransactions < 100; @@ -60,8 +60,8 @@ uint64_t maxSize = 0; uint64_t minVirtualSize = std::numeric_limits::max(); uint64_t maxVirtualSize = 0; - int64_t minSigOpCount = std::numeric_limits::max(); - int64_t maxSigOpCount = 0; + int64_t minSigChecks = std::numeric_limits::max(); + int64_t maxSigChecks = 0; // Consume random inputs, but make sure we don't consume more than // available for (size_t input = std::min(InsecureRandRange(maxOutputs) + 1, @@ -89,9 +89,9 @@ minVirtualSize = std::min(minSize, parent.GetVirtualSizeWithAncestors()); maxVirtualSize += parent.GetVirtualSizeWithAncestors(); - minSigOpCount = - std::min(minSigOpCount, parent.GetSigOpCountWithAncestors()); - maxSigOpCount += parent.GetSigOpCountWithAncestors(); + minSigChecks = + std::min(minSigChecks, parent.GetSigChecksWithAncestors()); + maxSigChecks += parent.GetSigChecksWithAncestors(); } // Produce random number of outputs @@ -108,10 +108,10 @@ } Amount randFee = int64_t(InsecureRandRange(300)) * SATOSHI; - int randSigOpCount = InsecureRandRange(5); + int randSigChecks = InsecureRandRange(5); testPool.addUnchecked( - entry.Fee(randFee).SigOpCount(randSigOpCount).FromTx(tx)); + entry.Fee(randFee).SigChecks(randSigChecks).FromTx(tx)); // Add this transaction to the totals. minAncestors += 1; @@ -126,28 +126,28 @@ // following: minVirtualSize += 0; maxVirtualSize += GetVirtualTransactionSize( - CTransaction(tx).GetTotalSize(), randSigOpCount); - minSigOpCount += randSigOpCount; - maxSigOpCount += randSigOpCount; + CTransaction(tx).GetTotalSize(), randSigChecks); + minSigChecks += randSigChecks; + maxSigChecks += randSigChecks; // Calculate overall values totalFee += randFee; totalSize += CTransaction(tx).GetTotalSize(); totalVirtualSize += GetVirtualTransactionSize( - CTransaction(tx).GetTotalSize(), randSigOpCount); - totalSigOpCount += randSigOpCount; + CTransaction(tx).GetTotalSize(), randSigChecks); + totalSigChecks += randSigChecks; CTxMemPoolEntry parentEntry = *testPool.mapTx.find(parentOfAllId); CTxMemPoolEntry latestEntry = *testPool.mapTx.find(curId); - // Based on size/sigops ranges we can compute more strict bounds for the - // virtual size ranges/totals, assuming virtualsize is monotonic in each - // argument. + // Based on size/sigChecks ranges we can compute more strict bounds for + // the virtual size ranges/totals, assuming virtualsize is monotonic in + // each argument. uint64_t minVirtualSize_strict = - GetVirtualTransactionSize(minSize, minSigOpCount); + GetVirtualTransactionSize(minSize, minSigChecks); uint64_t maxVirtualSize_strict = - GetVirtualTransactionSize(maxSize, maxSigOpCount); + GetVirtualTransactionSize(maxSize, maxSigChecks); uint64_t totalVirtualSize_strict = - GetVirtualTransactionSize(totalSize, totalSigOpCount); + GetVirtualTransactionSize(totalSize, totalSigChecks); // these are as-good or better than the earlier estimations. BOOST_CHECK(minVirtualSize_strict >= minVirtualSize); BOOST_CHECK(maxVirtualSize_strict <= maxVirtualSize); @@ -165,8 +165,8 @@ BOOST_CHECK(latestEntry.GetVirtualSizeWithAncestors() <= maxVirtualSize_strict); - BOOST_CHECK(latestEntry.GetSigOpCountWithAncestors() >= minSigOpCount); - BOOST_CHECK(latestEntry.GetSigOpCountWithAncestors() <= maxSigOpCount); + BOOST_CHECK(latestEntry.GetSigChecksWithAncestors() >= minSigChecks); + BOOST_CHECK(latestEntry.GetSigChecksWithAncestors() <= maxSigChecks); BOOST_CHECK(latestEntry.GetModFeesWithAncestors() >= minFees); BOOST_CHECK(latestEntry.GetModFeesWithAncestors() <= maxFees); @@ -177,8 +177,8 @@ BOOST_CHECK_EQUAL(parentEntry.GetVirtualSizeWithDescendants(), totalVirtualSize_strict); BOOST_CHECK_EQUAL(parentEntry.GetModFeesWithDescendants(), totalFee); - BOOST_CHECK_EQUAL(parentEntry.GetSigOpCountWithDescendants(), - totalSigOpCount); + BOOST_CHECK_EQUAL(parentEntry.GetSigChecksWithDescendants(), + totalSigChecks); } } @@ -328,11 +328,11 @@ TestMemPoolEntryHelper entry; /** - * Remove the default nonzero sigops, since the below tests are focussing on - * fee-based ordering and involve some artificially very tiny 21-byte - * transactions without any inputs. + * Remove the default nonzero sigChecks, since the below tests are + * focussing on fee-based ordering and involve some artificially very tiny + * 21-byte transactions without any inputs. */ - entry.SigOpCount(0); + entry.SigChecks(0); /* 3rd highest fee */ CMutableTransaction tx1 = CMutableTransaction(); @@ -522,11 +522,11 @@ TestMemPoolEntryHelper entry; /** - * Remove the default nonzero sigops, since the below tests are focussing on - * fee-based ordering and involve some artificially very tiny 21-byte + * Remove the default nonzero sigChecks, since the below tests are focussing + * on fee-based ordering and involve some artificially very tiny 21-byte * transactions without any inputs. */ - entry.SigOpCount(0); + entry.SigChecks(0); /* 3rd highest fee */ CMutableTransaction tx1 = CMutableTransaction(); diff --git a/src/test/util/setup_common.h b/src/test/util/setup_common.h --- a/src/test/util/setup_common.h +++ b/src/test/util/setup_common.h @@ -202,10 +202,10 @@ int64_t nTime; unsigned int nHeight; bool spendsCoinbase; - unsigned int nSigOpCount; + unsigned int nSigChecks; TestMemPoolEntryHelper() - : nFee(), nTime(0), nHeight(1), spendsCoinbase(false), nSigOpCount(1) {} + : nFee(), nTime(0), nHeight(1), spendsCoinbase(false), nSigChecks(1) {} CTxMemPoolEntry FromTx(const CMutableTransaction &tx) const; CTxMemPoolEntry FromTx(const CTransactionRef &tx) const; @@ -227,8 +227,8 @@ spendsCoinbase = _flag; return *this; } - TestMemPoolEntryHelper &SigOpCount(unsigned int _nSigOpCount) { - nSigOpCount = _nSigOpCount; + TestMemPoolEntryHelper &SigChecks(unsigned int _nSigChecks) { + nSigChecks = _nSigChecks; return *this; } }; diff --git a/src/test/util/setup_common.cpp b/src/test/util/setup_common.cpp --- a/src/test/util/setup_common.cpp +++ b/src/test/util/setup_common.cpp @@ -403,8 +403,8 @@ CTxMemPoolEntry TestMemPoolEntryHelper::FromTx(const CTransactionRef &tx) const { - return CTxMemPoolEntry(tx, nFee, nTime, nHeight, spendsCoinbase, - nSigOpCount, LockPoints()); + return CTxMemPoolEntry(tx, nFee, nTime, nHeight, spendsCoinbase, nSigChecks, + LockPoints()); } /** diff --git a/src/txmempool.h b/src/txmempool.h --- a/src/txmempool.h +++ b/src/txmempool.h @@ -108,13 +108,8 @@ const unsigned int entryHeight; //! keep track of transactions that spend a coinbase const bool spendsCoinbase; - /** - * Total sigop plus P2SH sigops count. - * After the sigchecks activation we repurpose the 'sigops' tracking in - * mempool/mining to actually track sigchecks instead. (Proper SigOps will - * not need to be counted any more since it's getting deactivated.) - */ - const int64_t sigOpCount; + //! Total sigChecks + const int64_t sigChecks; //! Used for determining the priority of the transaction for mining in a //! block Amount feeDelta{Amount::zero()}; @@ -130,19 +125,19 @@ uint64_t nSizeWithDescendants; //! ... and total fees (all including us) Amount nModFeesWithDescendants; - //! ... and sigop count - int64_t nSigOpCountWithDescendants; + //! ... and sichecks + int64_t nSigChecksWithDescendants; // Analogous statistics for ancestor transactions uint64_t nCountWithAncestors{1}; uint64_t nSizeWithAncestors; Amount nModFeesWithAncestors; - int64_t nSigOpCountWithAncestors; + int64_t nSigChecksWithAncestors; public: CTxMemPoolEntry(const CTransactionRef &_tx, const Amount fee, int64_t time, unsigned int entry_height, bool spends_coinbase, - int64_t sigops_count, LockPoints lp); + int64_t sigchecks, LockPoints lp); const CTransaction &GetTx() const { return *this->tx; } CTransactionRef GetSharedTx() const { return this->tx; } @@ -152,17 +147,17 @@ std::chrono::seconds GetTime() const { return std::chrono::seconds{nTime}; } unsigned int GetHeight() const { return entryHeight; } - int64_t GetSigOpCount() const { return sigOpCount; } + int64_t GetSigChecks() const { return sigChecks; } Amount GetModifiedFee() const { return nFee + feeDelta; } size_t DynamicMemoryUsage() const { return nUsageSize; } const LockPoints &GetLockPoints() const { return lockPoints; } // Adjusts the descendant state. void UpdateDescendantState(int64_t modifySize, Amount modifyFee, - int64_t modifyCount, int64_t modifySigOpCount); + int64_t modifyCount, int64_t modifySigChecks); // Adjusts the ancestor state void UpdateAncestorState(int64_t modifySize, Amount modifyFee, - int64_t modifyCount, int64_t modifySigOps); + int64_t modifyCount, int64_t modifySigChecks); // Updates the fee delta used for mining priority score, and the // modified fees with descendants. void UpdateFeeDelta(Amount feeDelta); @@ -173,8 +168,8 @@ uint64_t GetSizeWithDescendants() const { return nSizeWithDescendants; } uint64_t GetVirtualSizeWithDescendants() const; Amount GetModFeesWithDescendants() const { return nModFeesWithDescendants; } - int64_t GetSigOpCountWithDescendants() const { - return nSigOpCountWithDescendants; + int64_t GetSigChecksWithDescendants() const { + return nSigChecksWithDescendants; } bool GetSpendsCoinbase() const { return spendsCoinbase; } @@ -183,8 +178,8 @@ uint64_t GetSizeWithAncestors() const { return nSizeWithAncestors; } uint64_t GetVirtualSizeWithAncestors() const; Amount GetModFeesWithAncestors() const { return nModFeesWithAncestors; } - int64_t GetSigOpCountWithAncestors() const { - return nSigOpCountWithAncestors; + int64_t GetSigChecksWithAncestors() const { + return nSigChecksWithAncestors; } const Parents &GetMemPoolParentsConst() const { return m_parents; } diff --git a/src/txmempool.cpp b/src/txmempool.cpp --- a/src/txmempool.cpp +++ b/src/txmempool.cpp @@ -31,38 +31,38 @@ // Helpers for modifying CTxMemPool::mapTx, which is a boost multi_index. struct update_descendant_state { update_descendant_state(int64_t _modifySize, Amount _modifyFee, - int64_t _modifyCount, int64_t _modifySigOpCount) + int64_t _modifyCount, int64_t _modifySigChecks) : modifySize(_modifySize), modifyFee(_modifyFee), - modifyCount(_modifyCount), modifySigOpCount(_modifySigOpCount) {} + modifyCount(_modifyCount), modifySigChecks(_modifySigChecks) {} void operator()(CTxMemPoolEntry &e) { e.UpdateDescendantState(modifySize, modifyFee, modifyCount, - modifySigOpCount); + modifySigChecks); } private: int64_t modifySize; Amount modifyFee; int64_t modifyCount; - int64_t modifySigOpCount; + int64_t modifySigChecks; }; struct update_ancestor_state { update_ancestor_state(int64_t _modifySize, Amount _modifyFee, - int64_t _modifyCount, int64_t _modifySigOpCount) + int64_t _modifyCount, int64_t _modifySigChecks) : modifySize(_modifySize), modifyFee(_modifyFee), - modifyCount(_modifyCount), modifySigOpCount(_modifySigOpCount) {} + modifyCount(_modifyCount), modifySigChecks(_modifySigChecks) {} void operator()(CTxMemPoolEntry &e) { e.UpdateAncestorState(modifySize, modifyFee, modifyCount, - modifySigOpCount); + modifySigChecks); } private: int64_t modifySize; Amount modifyFee; int64_t modifyCount; - int64_t modifySigOpCount; + int64_t modifySigChecks; }; bool TestLockPointValidity(const CChain &active_chain, const LockPoints &lp) { @@ -85,32 +85,32 @@ CTxMemPoolEntry::CTxMemPoolEntry(const CTransactionRef &_tx, const Amount fee, int64_t time, unsigned int entry_height, - bool spends_coinbase, int64_t sigops_count, + bool spends_coinbase, int64_t _sigChecks, LockPoints lp) : tx{_tx}, nFee{fee}, nTxSize(tx->GetTotalSize()), nUsageSize{RecursiveDynamicUsage(tx)}, nTime(time), entryHeight{entry_height}, spendsCoinbase(spends_coinbase), - sigOpCount(sigops_count), lockPoints(lp), - nSizeWithDescendants{GetTxSize()}, nModFeesWithDescendants{nFee}, - nSigOpCountWithDescendants{sigOpCount}, nSizeWithAncestors{GetTxSize()}, - nModFeesWithAncestors{nFee}, nSigOpCountWithAncestors{sigOpCount} {} + sigChecks(_sigChecks), lockPoints(lp), nSizeWithDescendants{GetTxSize()}, + nModFeesWithDescendants{nFee}, nSigChecksWithDescendants{sigChecks}, + nSizeWithAncestors{GetTxSize()}, nModFeesWithAncestors{nFee}, + nSigChecksWithAncestors{sigChecks} {} size_t CTxMemPoolEntry::GetTxVirtualSize() const { - return GetVirtualTransactionSize(nTxSize, sigOpCount); + return GetVirtualTransactionSize(nTxSize, sigChecks); } uint64_t CTxMemPoolEntry::GetVirtualSizeWithDescendants() const { // note this is distinct from the sum of descendants' individual virtual // sizes, and may be smaller. return GetVirtualTransactionSize(nSizeWithDescendants, - nSigOpCountWithDescendants); + nSigChecksWithDescendants); } uint64_t CTxMemPoolEntry::GetVirtualSizeWithAncestors() const { // note this is distinct from the sum of ancestors' individual virtual // sizes, and may be smaller. return GetVirtualTransactionSize(nSizeWithAncestors, - nSigOpCountWithAncestors); + nSigChecksWithAncestors); } void CTxMemPoolEntry::UpdateFeeDelta(Amount newFeeDelta) { @@ -158,19 +158,19 @@ int64_t modifySize = 0; int64_t modifyCount = 0; Amount modifyFee = Amount::zero(); - int64_t modifySigOpCount = 0; + int64_t modifySigChecks = 0; for (const CTxMemPoolEntry &descendant : descendants) { if (!setExclude.count(descendant.GetTx().GetId())) { modifySize += descendant.GetTxSize(); modifyFee += descendant.GetModifiedFee(); modifyCount++; - modifySigOpCount += descendant.GetSigOpCount(); + modifySigChecks += descendant.GetSigChecks(); cachedDescendants[updateIt].insert(mapTx.iterator_to(descendant)); // Update ancestor state for each descendant mapTx.modify(mapTx.iterator_to(descendant), update_ancestor_state(updateIt->GetTxSize(), updateIt->GetModifiedFee(), 1, - updateIt->GetSigOpCount())); + updateIt->GetSigChecks())); // Don't directly remove the transaction here -- doing so would // invalidate iterators in cachedDescendants. Mark it for removal // by inserting into descendants_to_remove. @@ -182,7 +182,7 @@ } mapTx.modify(updateIt, update_descendant_state(modifySize, modifyFee, modifyCount, - modifySigOpCount)); + modifySigChecks)); } void CTxMemPool::UpdateTransactionsFromBlock( @@ -394,12 +394,12 @@ } const int64_t updateCount = (add ? 1 : -1); const int64_t updateSize = updateCount * it->GetTxSize(); - const int64_t updateSigOpCount = updateCount * it->GetSigOpCount(); + const int64_t updateSigChecks = updateCount * it->GetSigChecks(); const Amount updateFee = updateCount * it->GetModifiedFee(); for (txiter ancestorIt : setAncestors) { mapTx.modify(ancestorIt, update_descendant_state(updateSize, updateFee, updateCount, - updateSigOpCount)); + updateSigChecks)); } } @@ -407,16 +407,16 @@ const setEntries &setAncestors) { int64_t updateCount = setAncestors.size(); int64_t updateSize = 0; - int64_t updateSigOpsCount = 0; + int64_t updateSigChecks = 0; Amount updateFee = Amount::zero(); for (txiter ancestorIt : setAncestors) { updateSize += ancestorIt->GetTxSize(); updateFee += ancestorIt->GetModifiedFee(); - updateSigOpsCount += ancestorIt->GetSigOpCount(); + updateSigChecks += ancestorIt->GetSigChecks(); } mapTx.modify(it, update_ancestor_state(updateSize, updateFee, updateCount, - updateSigOpsCount)); + updateSigChecks)); } void CTxMemPool::UpdateChildrenForRemoval(txiter it) { @@ -444,10 +444,10 @@ setDescendants.erase(removeIt); // don't update state for self int64_t modifySize = -int64_t(removeIt->GetTxSize()); Amount modifyFee = -1 * removeIt->GetModifiedFee(); - int modifySigOps = -removeIt->GetSigOpCount(); + int modifySigChecks = -removeIt->GetSigChecks(); for (txiter dit : setDescendants) { mapTx.modify(dit, update_ancestor_state(modifySize, modifyFee, - -1, modifySigOps)); + -1, modifySigChecks)); } } } @@ -493,26 +493,26 @@ void CTxMemPoolEntry::UpdateDescendantState(int64_t modifySize, Amount modifyFee, int64_t modifyCount, - int64_t modifySigOpCount) { + int64_t modifySigChecks) { nSizeWithDescendants += modifySize; assert(int64_t(nSizeWithDescendants) > 0); nModFeesWithDescendants += modifyFee; nCountWithDescendants += modifyCount; assert(int64_t(nCountWithDescendants) > 0); - nSigOpCountWithDescendants += modifySigOpCount; - assert(int64_t(nSigOpCountWithDescendants) >= 0); + nSigChecksWithDescendants += modifySigChecks; + assert(int64_t(nSigChecksWithDescendants) >= 0); } void CTxMemPoolEntry::UpdateAncestorState(int64_t modifySize, Amount modifyFee, int64_t modifyCount, - int64_t modifySigOps) { + int64_t modifySigChecks) { nSizeWithAncestors += modifySize; assert(int64_t(nSizeWithAncestors) > 0); nModFeesWithAncestors += modifyFee; nCountWithAncestors += modifyCount; assert(int64_t(nCountWithAncestors) > 0); - nSigOpCountWithAncestors += modifySigOps; - assert(int(nSigOpCountWithAncestors) >= 0); + nSigChecksWithAncestors += modifySigChecks; + assert(int(nSigChecksWithAncestors) >= 0); } CTxMemPool::CTxMemPool(int check_ratio) : m_check_ratio(check_ratio) { @@ -857,17 +857,17 @@ uint64_t nCountCheck = setAncestors.size() + 1; uint64_t nSizeCheck = it->GetTxSize(); Amount nFeesCheck = it->GetModifiedFee(); - int64_t nSigOpCheck = it->GetSigOpCount(); + int64_t nSigChecksCheck = it->GetSigChecks(); for (txiter ancestorIt : setAncestors) { nSizeCheck += ancestorIt->GetTxSize(); nFeesCheck += ancestorIt->GetModifiedFee(); - nSigOpCheck += ancestorIt->GetSigOpCount(); + nSigChecksCheck += ancestorIt->GetSigChecks(); } assert(it->GetCountWithAncestors() == nCountCheck); assert(it->GetSizeWithAncestors() == nSizeCheck); - assert(it->GetSigOpCountWithAncestors() == nSigOpCheck); + assert(it->GetSigChecksWithAncestors() == nSigChecksCheck); assert(it->GetModFeesWithAncestors() == nFeesCheck); // Sanity check: we are walking in ascending ancestor count order. assert(prev_ancestor_count <= it->GetCountWithAncestors()); @@ -877,7 +877,7 @@ CTxMemPoolEntry::Children setChildrenCheck; auto iter = mapNextTx.lower_bound(COutPoint(it->GetTx().GetId(), 0)); uint64_t child_sizes = 0; - int64_t child_sigop_counts = 0; + int64_t child_sigChecks = 0; for (; iter != mapNextTx.end() && iter->first->GetTxId() == it->GetTx().GetId(); ++iter) { @@ -886,7 +886,7 @@ assert(childit != mapTx.end()); if (setChildrenCheck.insert(*childit).second) { child_sizes += childit->GetTxSize(); - child_sigop_counts += childit->GetSigOpCount(); + child_sigChecks += childit->GetSigChecks(); } } assert(setChildrenCheck.size() == it->GetMemPoolChildrenConst().size()); @@ -896,8 +896,8 @@ // children. Just a sanity check, not definitive that this calc is // correct... assert(it->GetSizeWithDescendants() >= child_sizes + it->GetTxSize()); - assert(it->GetSigOpCountWithDescendants() >= - child_sigop_counts + it->GetSigOpCount()); + assert(it->GetSigChecksWithDescendants() >= + child_sigChecks + it->GetSigChecks()); // Not used. CheckTxInputs() should always pass TxValidationState dummy_state;