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:
Nik Bougalis
2016-05-31 00:05:25 -07:00
parent d1200224e2
commit 279c2a6f82
13 changed files with 106 additions and 129 deletions

View File

@@ -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;