Hi,

I run a bitcoin server which have acting strange the latest 3-4 days. For some reason the unconfirmed balance when running bitcoin-cli getunconfirmedbalance shows up as 50.589243 BTC which of course isn't true.

How do I reset this? Why did this occur? Tried both v0.12 and v0.12.99, same problem.

Thanks in advance,
Nori

{
    if (pwallet == 0)
        return 0;
    
    if (IsCoinBase() && GetBlocksToMaturity() > 0)
        return 0;
    if (fUseCache && fAvailableCreditCached)
        return nAvailableCreditCached;
    CAmount nCredit = 0;
    uint256 hashTx = GetHash();
    for (unsigned int i = 0; i < vout.size(); i++)
    {
        if (!pwallet->IsSpent(hashTx, i))
        {
            const CTxOut &txout = vout[i];
            nCredit += pwallet->GetCredit(txout, ISMINE_SPENDABLE);
            if (!MoneyRange(nCredit))
                throw std::runtime_error("CWalletTx::GetAvailableCredit() : value out of range");
        }
    }
    nAvailableCreditCached = nCredit;
    fAvailableCreditCached = true;
    return nCredit;
}
CAmount CWalletTx::GetImmatureWatchOnlyCredit(const bool& fUseCache) const