From 9558397bb7aa59ab240e851abaaee71ff10ca78c Mon Sep 17 00:00:00 2001 From: lateminer Date: Thu, 25 Oct 2018 19:55:30 +0300 Subject: [PATCH] Add more checks for coinstake transactions --- src/wallet/rpcwallet.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index cfe2a68fa..e67aeb63b 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -76,7 +76,7 @@ void WalletTxToJSON(const CWalletTx& wtx, UniValue& entry) { int confirms = wtx.GetDepthInMainChain(); entry.push_back(Pair("confirmations", confirms)); - if (wtx.IsCoinBase()) + if (wtx.IsCoinBase() || wtx.IsCoinStake()) entry.push_back(Pair("generated", true)); if (confirms > 0) { @@ -601,7 +601,7 @@ UniValue getreceivedbyaddress(const UniValue& params, bool fHelp) for (map::iterator it = pwalletMain->mapWallet.begin(); it != pwalletMain->mapWallet.end(); ++it) { const CWalletTx& wtx = (*it).second; - if (wtx.IsCoinBase() || !CheckFinalTx(wtx)) + if (wtx.IsCoinBase() || wtx.IsCoinStake() ||!CheckFinalTx(wtx)) continue; for (const CTxOut &txout : wtx.vout)