From d8ea921d01404cc0b63b277878d0f2f988a1daba Mon Sep 17 00:00:00 2001 From: stratospher <44024636+stratospher@users.noreply.github.com> Date: Wed, 28 Jan 2026 18:39:58 +0530 Subject: [PATCH] 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. --- src/wallet/spend.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wallet/spend.cpp b/src/wallet/spend.cpp index a2ac727d6f9..30edd62a49c 100644 --- a/src/wallet/spend.cpp +++ b/src/wallet/spend.cpp @@ -203,7 +203,7 @@ size_t CoinsResult::Size() const std::vector CoinsResult::All() const { std::vector all; - all.reserve(coins.size()); + all.reserve(Size()); for (const auto& it : coins) { all.insert(all.end(), it.second.begin(), it.second.end()); }