refactor: add CoinsCachePair alias

This commit is contained in:
Andrew Toth 2024-06-28 16:57:42 -04:00
parent f08faeade2
commit 75f36d241d
No known key found for this signature in database
GPG key ID: 60007AFC8938B018

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.
*
@ -155,8 +158,8 @@ using CCoinsMap = std::unordered_map<COutPoint,
CCoinsCacheEntry,
SaltedOutpointHasher,
std::equal_to<COutPoint>,
PoolAllocator<std::pair<const COutPoint, CCoinsCacheEntry>,
sizeof(std::pair<const COutPoint, CCoinsCacheEntry>) + sizeof(void*) * 4>>;
PoolAllocator<CoinsCachePair,
sizeof(CoinsCachePair) + sizeof(void*) * 4>>;
using CCoinsMapMemoryResource = CCoinsMap::allocator_type::ResourceType;