From fefa3be782eaf3e2fbff3ed8772fb91f2134ac0d Mon Sep 17 00:00:00 2001 From: stratospher <44024636+stratospher@users.noreply.github.com> Date: Wed, 14 Jan 2026 14:17:02 +0530 Subject: [PATCH] wallet: fix, make 'total_effective_amount' optional actually optional this is not needed for the remaining commits but good to fix and came up in #25269 review. Co-authored-by: furszy --- src/wallet/spend.cpp | 2 +- src/wallet/spend.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/wallet/spend.cpp b/src/wallet/spend.cpp index c7c41f5d0f1..1e0ac8f0428 100644 --- a/src/wallet/spend.cpp +++ b/src/wallet/spend.cpp @@ -223,7 +223,7 @@ void CoinsResult::Erase(const std::unordered_set GetEffectiveTotalAmount() {return total_effective_amount; } + std::optional GetEffectiveTotalAmount() { return total_effective_amount; } private: /** Sum of all available coins raw value */ CAmount total_amount{0}; /** Sum of all available coins effective value (each output value minus fees required to spend it) */ - std::optional total_effective_amount{0}; + std::optional total_effective_amount; }; struct CoinFilterParams {