From 3c768739fc6c0bb321383062103c80b45f505e83 Mon Sep 17 00:00:00 2001 From: UdjinM6 Date: Fri, 29 Jan 2021 05:55:58 +0300 Subject: [PATCH] chainlocks: Send an inv for the best ChainLock we have when replying to `mempool` p2p message (#3962) --- src/net_processing.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/net_processing.cpp b/src/net_processing.cpp index 065d86214d..d56f47ccd2 100644 --- a/src/net_processing.cpp +++ b/src/net_processing.cpp @@ -4245,6 +4245,14 @@ bool PeerLogicValidation::SendMessages(CNode* pto) if (!llmq::quorumInstantSendManager->GetInstantSendLockHashByTxid(hash, islockHash)) continue; 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(); }