validation: Pass in chain to ::TestLockPointValidity

This commit is contained in:
Carl Dong
2020-09-16 17:40:00 -04:00
parent 120aaba9ac
commit 71734c65dc
3 changed files with 5 additions and 4 deletions

View File

@@ -511,7 +511,7 @@ void CTxMemPool::removeForReorg(const CCoinsViewCache *pcoins, unsigned int nMem
for (indexed_transaction_set::const_iterator it = mapTx.begin(); it != mapTx.end(); it++) {
const CTransaction& tx = it->GetTx();
LockPoints lp = it->GetLockPoints();
bool validLP = TestLockPointValidity(&lp);
bool validLP = TestLockPointValidity(::ChainActive(), &lp);
if (!CheckFinalTx(::ChainActive().Tip(), tx, flags) || !CheckSequenceLocks(::ChainstateActive(), *this, tx, flags, &lp, validLP)) {
// Note if CheckSequenceLocks fails the LockPoints may still be invalid
// So it's critical that we remove the tx and not depend on the LockPoints.