wallet: correctly reserve in CoinsResult::All()

coins.size() would be the number of the OutputType keys in the map.
whereas Size() would return total number of COutput objects when
flattening the map.
This commit is contained in:
stratospher
2026-01-28 18:39:58 +05:30
parent 7072d825e3
commit d8ea921d01

View File

@@ -203,7 +203,7 @@ size_t CoinsResult::Size() const
std::vector<COutput> CoinsResult::All() const
{
std::vector<COutput> all;
all.reserve(coins.size());
all.reserve(Size());
for (const auto& it : coins) {
all.insert(all.end(), it.second.begin(), it.second.end());
}