mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-02 17:06:00 +00:00
Dispatch peerHas to JobQueue
This commit is contained in:
@@ -789,20 +789,17 @@ public:
|
||||
|
||||
std::vector< boost::weak_ptr<Peer> >& set = mPeerData[hashSet];
|
||||
BOOST_FOREACH (boost::weak_ptr<Peer>& iit, set)
|
||||
|
||||
if (iit.lock () == peer)
|
||||
return false;
|
||||
|
||||
set.push_back (peer);
|
||||
|
||||
boost::unordered_map<uint256
|
||||
, TransactionAcquire::pointer>::iterator acq
|
||||
= mAcquiring.find (hashSet);
|
||||
|
||||
if (acq != mAcquiring.end ())
|
||||
{ // make sure it doesn't go away
|
||||
TransactionAcquire::pointer ta = acq->second;
|
||||
ta->peerHas (peer);
|
||||
}
|
||||
getApp().getJobQueue().addJob(jtTXN_DATA, "peerHasTxnData",
|
||||
std::bind(&TransactionAcquire::peerHas, acq->second, peer));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1563,7 +1563,7 @@ SHAMapAddNode NetworkOPsImp::gotTXData (const boost::shared_ptr<Peer>& peer, uin
|
||||
|
||||
bool NetworkOPsImp::hasTXSet (const boost::shared_ptr<Peer>& peer, uint256 const& set, protocol::TxSetStatus status)
|
||||
{
|
||||
if (!haveConsensusObject ())
|
||||
if (mConsensus == nullptr)
|
||||
{
|
||||
m_journal.info << "Peer has TX set, not during consensus";
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user