instantsend: Add islocks created from recovered sigs to the queue (#4422)

Processing them asap can lead to a race condition
This commit is contained in:
UdjinM6 2021-09-14 14:03:26 +03:00 committed by GitHub
parent e408f91573
commit 43183f6aab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -731,7 +731,13 @@ void CInstantSendManager::HandleNewInstantSendLockRecoveredSig(const llmq::CReco
}
islock->sig = recoveredSig.sig;
ProcessInstantSendLock(-1, ::SerializeHash(*islock), islock);
auto hash = ::SerializeHash(*islock);
LOCK(cs);
if (pendingInstantSendLocks.count(hash) || db.KnownInstantSendLock(hash)) {
return;
}
pendingInstantSendLocks.emplace(hash, std::make_pair(-1, islock));
}
void CInstantSendManager::ProcessMessage(CNode* pfrom, const std::string& strCommand, CDataStream& vRecv)