Don't check for posInBlock when updating pindexMined

ProcessNewTransaction is now only called with pindex != nullptr when a
block is connected but never when it is disconnected, so there is no need
to check for posInBlock anymore (we don't even have it now).
This commit is contained in:
Alexander Block 2019-05-27 13:43:57 +02:00
parent 0b4f7b9b6d
commit 5233045373

View File

@ -986,7 +986,7 @@ void CInstantSendManager::ProcessNewTransaction(const CTransactionRef& tx, const
if (!chainlocked && islockHash.IsNull()) {
// TX is not locked, so make sure it is tracked
AddNonLockedTx(tx);
nonLockedTxs.at(tx->GetHash()).pindexMined = posInBlock != -1 ? pindex : nullptr;
nonLockedTxs.at(tx->GetHash()).pindexMined = pindex;
} else {
// TX is locked, so make sure we don't track it anymore
RemoveNonLockedTx(tx->GetHash(), true);