From f12af33ee234edabe19e41f8210508042024f438 Mon Sep 17 00:00:00 2001 From: PeterL73 Date: Tue, 22 Dec 2020 07:39:28 +0000 Subject: [PATCH] clear StakeableCoins before initializing --- src/wallet/wallet.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 01dbb057cf1a..dd6401515960 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -2414,6 +2414,8 @@ bool CWallet::StakeableCoins(std::vector* pCoins) const bool fIncludeColdStaking = !sporkManager.IsSporkActive(SPORK_19_COLDSTAKING_MAINTENANCE) && gArgs.GetBoolArg("-coldstaking", DEFAULT_COLDSTAKING); + if (pCoins) pCoins->clear(); + LOCK2(cs_main, cs_wallet); for (const auto& it : mapWallet) { const uint256& wtxid = it.first;