refactor: add CoinsCachePair alias

This commit is contained in:
Andrew Toth committed 2024-08-01 23:36:00 -04:00
1 parent f08faeade2
commit 75f36d241d
1 file changed
+5 -2
+5 -2
View File
@@ -86,6 +86,9 @@ public:
} }
}; };
struct CCoinsCacheEntry;
using CoinsCachePair = std::pair<const COutPoint, CCoinsCacheEntry>;
/** /**
* A Coin in one level of the coins database caching hierarchy. * A Coin in one level of the coins database caching hierarchy.
* *
@@ -155,8 +158,8 @@ using CCoinsMap = std::unordered_map<COutPoint,
CCoinsCacheEntry, CCoinsCacheEntry,
SaltedOutpointHasher, SaltedOutpointHasher,
std::equal_to<COutPoint>, std::equal_to<COutPoint>,
PoolAllocator<std::pair<const COutPoint, CCoinsCacheEntry>, PoolAllocator<CoinsCachePair,
sizeof(std::pair<const COutPoint, CCoinsCacheEntry>) + sizeof(void*) * 4>>; sizeof(CoinsCachePair) + sizeof(void*) * 4>>;
using CCoinsMapMemoryResource = CCoinsMap::allocator_type::ResourceType; using CCoinsMapMemoryResource = CCoinsMap::allocator_type::ResourceType;