release m_tx_download_mutex before MakeAndPushMessage GETDATA
This commit is contained in:
1 parent
bce5f37c7b
commit
e543c657da
1 file changed
+2
-1
@@ -6295,6 +6295,7 @@ bool PeerManagerImpl::SendMessages(CNode* pto)
|
|||||||
//
|
//
|
||||||
// Message: getdata (transactions)
|
// Message: getdata (transactions)
|
||||||
//
|
//
|
||||||
|
{
|
||||||
LOCK(m_tx_download_mutex);
|
LOCK(m_tx_download_mutex);
|
||||||
std::vector<std::pair<NodeId, GenTxid>> expired;
|
std::vector<std::pair<NodeId, GenTxid>> expired;
|
||||||
auto requestable = m_txrequest.GetRequestable(pto->GetId(), current_time, &expired);
|
auto requestable = m_txrequest.GetRequestable(pto->GetId(), current_time, &expired);
|
||||||
@@ -6320,7 +6321,7 @@ bool PeerManagerImpl::SendMessages(CNode* pto)
|
|||||||
m_txrequest.ForgetTxHash(gtxid.GetHash());
|
m_txrequest.ForgetTxHash(gtxid.GetHash());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} // release m_tx_download_mutex
|
||||||
|
|
||||||
if (!vGetData.empty())
|
if (!vGetData.empty())
|
||||||
MakeAndPushMessage(*pto, NetMsgType::GETDATA, vGetData);
|
MakeAndPushMessage(*pto, NetMsgType::GETDATA, vGetData);
|
||||||
|
|||||||
Reference in new issue
Block a user