mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Simplify PeerSet, InboundLedger and TransactionAcquire:
* Use std::mutex instead of std::recursive_mutex * Remove unnecessary type alias * Use std::set instead of ripple::hash_map * Don't reinvent virtual functions
This commit is contained in:
@@ -538,7 +538,7 @@ LedgerMaster::getFetchPack (LedgerHash missingHash, LedgerIndex missingIndex)
|
||||
|
||||
// Select target Peer based on highest score. The score is randomized
|
||||
// but biased in favor of Peers with low latency.
|
||||
Peer::ptr target;
|
||||
std::shared_ptr<Peer> target;
|
||||
{
|
||||
int maxScore = 0;
|
||||
auto peerList = app_.overlay ().getActivePeers();
|
||||
@@ -1826,7 +1826,7 @@ LedgerMaster::makeFetchPack (
|
||||
return;
|
||||
}
|
||||
|
||||
Peer::ptr peer = wPeer.lock ();
|
||||
auto peer = wPeer.lock ();
|
||||
|
||||
if (!peer)
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user