validation: Move GetSpendHeight to BlockManager

[META] This commit should be followed up by removing the comments and
       assertions meant only to show that the change is correct.

GetSpendHeight only acts on BlockManager.
This commit is contained in:
Carl Dong
2020-08-25 17:11:32 -04:00
parent b026e318c3
commit e4b95eefbc
3 changed files with 13 additions and 12 deletions

View File

@@ -626,7 +626,7 @@ void CTxMemPool::check(const CCoinsViewCache *pcoins) const
uint64_t innerUsage = 0;
CCoinsViewCache mempoolDuplicate(const_cast<CCoinsViewCache*>(pcoins));
const int64_t spendheight = GetSpendHeight(mempoolDuplicate);
const int64_t spendheight = g_chainman.m_blockman.GetSpendHeight(mempoolDuplicate);
std::list<const CTxMemPoolEntry*> waitingOnDependants;
for (indexed_transaction_set::const_iterator it = mapTx.begin(); it != mapTx.end(); it++) {