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 committed 2026-02-06 09:36:22 +05:30
1 parent 7072d825e3
commit d8ea921d01
1 file changed
+1 -1
+1 -1
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());
}