From 478965226f0d1fc61c43d629c5f7cdd765a8db1b Mon Sep 17 00:00:00 2001 From: random-zebra Date: Tue, 14 Jan 2020 10:13:36 +0100 Subject: [PATCH] [Wallet] Don't add P2CS automatically to CWalletTx::GetLockedCredit --- src/wallet/wallet.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index e3b42ced42903..86a45c2dbe990 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -1336,15 +1336,12 @@ CAmount CWalletTx::GetLockedCredit() const // Skip spent coins if (pwallet->IsSpent(hashTx, i)) continue; - // Add delegated coins - nCredit += pwallet->GetCredit(txout, ISMINE_SPENDABLE_DELEGATED); - // Add locked coins if (pwallet->IsLockedCoin(hashTx, i)) { - nCredit += pwallet->GetCredit(txout, ISMINE_SPENDABLE); + nCredit += pwallet->GetCredit(txout, ISMINE_SPENDABLE_ALL); } - // Add masternode collaterals which are handled likc locked coins + // Add masternode collaterals which are handled like locked coins else if (fMasterNode && vout[i].nValue == 10000 * COIN) { nCredit += pwallet->GetCredit(txout, ISMINE_SPENDABLE); }