diff --git a/src/node/txorphanage.cpp b/src/node/txorphanage.cpp index ca7eb20470a..4b25ab4d245 100644 --- a/src/node/txorphanage.cpp +++ b/src/node/txorphanage.cpp @@ -91,12 +91,13 @@ class TxOrphanageImpl final : public TxOrphanage { } }; - struct OrphanIndices final : boost::multi_index::indexed_by< - boost::multi_index::ordered_unique, WtxidExtractor>, - boost::multi_index::ordered_unique, ByPeerViewExtractor> - >{}; - - using AnnouncementMap = boost::multi_index::multi_index_container; + using AnnouncementMap = boost::multi_index::multi_index_container< + Announcement, + boost::multi_index::indexed_by< + boost::multi_index::ordered_unique, WtxidExtractor>, + boost::multi_index::ordered_unique, ByPeerViewExtractor> + > + >; template using Iter = typename AnnouncementMap::index::type::iterator; AnnouncementMap m_orphans; diff --git a/src/txmempool.h b/src/txmempool.h index c4723f89155..ae59057ca62 100644 --- a/src/txmempool.h +++ b/src/txmempool.h @@ -211,7 +211,9 @@ public: static const int ROLLING_FEE_HALFLIFE = 60 * 60 * 12; // public only for testing - struct CTxMemPoolEntry_Indices final : boost::multi_index::indexed_by< + using indexed_transaction_set = boost::multi_index_container< + CTxMemPoolEntry, + boost::multi_index::indexed_by< // sorted by txid boost::multi_index::hashed_unique, // sorted by wtxid @@ -227,11 +229,7 @@ public: CompareTxMemPoolEntryByEntryTime > > - {}; - typedef boost::multi_index_container< - CTxMemPoolEntry, - CTxMemPoolEntry_Indices - > indexed_transaction_set; + >; /** * This mutex needs to be locked when accessing `mapTx` or other members diff --git a/src/txrequest.cpp b/src/txrequest.cpp index 4d7240bee0d..53136a8e710 100644 --- a/src/txrequest.cpp +++ b/src/txrequest.cpp @@ -208,17 +208,15 @@ struct ByTimeViewExtractor } }; -struct Announcement_Indices final : boost::multi_index::indexed_by< - boost::multi_index::ordered_unique, ByPeerViewExtractor>, - boost::multi_index::ordered_non_unique, ByTxHashViewExtractor>, - boost::multi_index::ordered_non_unique, ByTimeViewExtractor> -> -{}; /** Data type for the main data structure (Announcement objects with ByPeer/ByTxHash/ByTime indexes). */ using Index = boost::multi_index_container< Announcement, - Announcement_Indices + boost::multi_index::indexed_by< + boost::multi_index::ordered_unique, ByPeerViewExtractor>, + boost::multi_index::ordered_non_unique, ByTxHashViewExtractor>, + boost::multi_index::ordered_non_unique, ByTimeViewExtractor> + > >; /** Helper type to simplify syntax of iterator types. */