Add more checks for coinstake transactions
This commit is contained in:
@@ -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<uint256, CWalletTx>::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)
|
||||
|
||||
Reference in New Issue
Block a user