instantsend: Push matching islocks when replying to merkleblock inv in getdata only when all txes are pushed (#4134)

This commit is contained in:
UdjinM6 2021-05-06 06:24:30 +03:00 committed by pasta
parent 4b93ea2e9a
commit 645e59205e

View File

@ -1533,6 +1533,8 @@ void static ProcessGetBlockData(CNode* pfrom, const CChainParams& chainparams, c
typedef std::pair<unsigned int, uint256> PairType;
for (PairType &pair : merkleBlock.vMatchedTxn) {
connman->PushMessage(pfrom, msgMaker.Make(NetMsgType::TX, *pblock->vtx[pair.first]));
}
for (PairType &pair : merkleBlock.vMatchedTxn) {
auto islock = llmq::quorumInstantSendManager->GetInstantSendLockByTxid(pair.second);
if (islock != nullptr) {
connman->PushMessage(pfrom, msgMaker.Make(NetMsgType::ISLOCK, *islock));