chainlocks: Send an inv for the best ChainLock we have when replying to mempool p2p message (#3962)

This commit is contained in:
UdjinM6 2021-01-29 05:55:58 +03:00 committed by GitHub
parent 2aa584ba33
commit 3c768739fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4245,6 +4245,14 @@ bool PeerLogicValidation::SendMessages(CNode* pto)
if (!llmq::quorumInstantSendManager->GetInstantSendLockHashByTxid(hash, islockHash)) continue; if (!llmq::quorumInstantSendManager->GetInstantSendLockHashByTxid(hash, islockHash)) continue;
queueAndMaybePushInv(CInv(MSG_ISLOCK, islockHash)); queueAndMaybePushInv(CInv(MSG_ISLOCK, islockHash));
} }
// Send an inv for the best ChainLock we have
const auto& clsig = llmq::chainLocksHandler->GetBestChainLock();
if (!clsig.IsNull()) {
uint256 chainlockHash = ::SerializeHash(clsig);
queueAndMaybePushInv(CInv(MSG_CLSIG, chainlockHash));
}
pto->timeLastMempoolReq = GetTime(); pto->timeLastMempoolReq = GetTime();
} }