Skip to content

Commit 75f36d2

Browse files
committed
refactor: add CoinsCachePair alias
1 parent f08faea commit 75f36d2

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/coins.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,9 @@ class Coin
8686
}
8787
};
8888

89+
struct CCoinsCacheEntry;
90+
using CoinsCachePair = std::pair<const COutPoint, CCoinsCacheEntry>;
91+
8992
/**
9093
* A Coin in one level of the coins database caching hierarchy.
9194
*
@@ -155,8 +158,8 @@ using CCoinsMap = std::unordered_map<COutPoint,
155158
CCoinsCacheEntry,
156159
SaltedOutpointHasher,
157160
std::equal_to<COutPoint>,
158-
PoolAllocator<std::pair<const COutPoint, CCoinsCacheEntry>,
159-
sizeof(std::pair<const COutPoint, CCoinsCacheEntry>) + sizeof(void*) * 4>>;
161+
PoolAllocator<CoinsCachePair,
162+
sizeof(CoinsCachePair) + sizeof(void*) * 4>>;
160163

161164
using CCoinsMapMemoryResource = CCoinsMap::allocator_type::ResourceType;
162165

0 commit comments

Comments
 (0)