message: Update wallet for coinstake check where needed
diff: @@ -1422,7 +1422,7 @@ int CWalletTx::GetRequestCount() const
  int nRequests = -1;
  {
  LOCK(pwallet->cs_wallet);
  - if (IsCoinBase())
  + if (IsCoinBase() || IsCoinStake())
  {
  // Generated block
  if (!hashUnset())
  @@ -1617,7 +1617,7 @@ void CWallet::ReacceptWalletTransactions()
  int nDepth = wtx.GetDepthInMainChain();
  - if (!wtx.IsCoinBase() && (nDepth == 0 && !wtx.isAbandoned())) {
  + if (!(wtx.IsCoinBase() || wtx.IsCoinStake()) && (nDepth == 0 && !wtx.isAbandoned())) {
  mapSorted.insert(std::make_pair(wtx.nOrderPos, &wtx));
  }
  }
  @@ -1636,7 +1636,7 @@ void CWallet::ReacceptWalletTransactions()
  bool CWalletTx::RelayWalletTransaction(CConnman* connman)
  {
  assert(pwallet->GetBroadcastTransactions());
  - if (!IsCoinBase() && !isAbandoned() && GetDepthInMainChain() == 0)
  + if (!(IsCoinBase() || IsCoinStake()) && !isAbandoned() && GetDepthInMainChain() == 0)
  {
  CValidationState state;
  /* GetDepthInMainChain already catches known conflicts. */
  @@ -1751,7 +1751,7 @@ CAmount CWalletTx::GetAvailableCredit(bool fUseCache) const
  return 0;
  // Must wait until coinbase is safely deep enough in the chain before valuing it
  - if (IsCoinBase() && GetBlocksToMaturity() > 0)
  + if ((IsCoinBase() || IsCoinStake()) && GetBlocksToMaturity() > 0)
  return 0;
  if (fUseCache && fAvailableCreditCached)
  @@ -1795,7 +1795,7 @@ CAmount CWalletTx::GetAvailableWatchOnlyCredit(const bool& fUseCache) const
  return 0;
  // Must wait until coinbase is safely deep enough in the chain before valuing it
  - if (IsCoinBase() && GetBlocksToMaturity() > 0)
  + if ((IsCoinBase() || IsCoinStake()) && GetBlocksToMaturity() > 0)
  return 0;
  if (fUseCache && fAvailableWatchCreditCached)
  