diff --git a/src/avalanche.h b/src/avalanche.h --- a/src/avalanche.h +++ b/src/avalanche.h @@ -247,8 +247,8 @@ } }; -typedef std::map - BlockVoteMap; +using BlockVoteMap = + std::map; struct next_request_time {}; struct query_timeout {}; @@ -268,7 +268,7 @@ */ std::atomic round; - typedef std::chrono::time_point TimePoint; + using TimePoint = std::chrono::time_point; struct Peer { NodeId nodeid; @@ -278,7 +278,7 @@ CPubKey pubkey; }; - typedef boost::multi_index_container< + using PeerSet = boost::multi_index_container< Peer, boost::multi_index::indexed_by< // index by nodeid boost::multi_index::hashed_unique< @@ -287,8 +287,7 @@ boost::multi_index::ordered_non_unique< boost::multi_index::tag, boost::multi_index::member>>> - PeerSet; + &Peer::nextRequestTime>>>>; RWCollection peerSet; @@ -306,7 +305,7 @@ mutable std::vector invs; }; - typedef boost::multi_index_container< + using QuerySet = boost::multi_index_container< Query, boost::multi_index::indexed_by< // index by nodeid/round @@ -319,8 +318,8 @@ // sorted by timeout boost::multi_index::ordered_non_unique< boost::multi_index::tag, - boost::multi_index::member>>> - QuerySet; + boost::multi_index::member>>>; RWCollection queries;