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

{
    vector<COutput> vCoins;
    AvailableCoins(vCoins, true, coinControl);
    
    if (coinControl && coinControl->HasSelected() && !coinControl->fAllowOtherInputs)
    {
        BOOST_FOREACH(const COutput& out, vCoins)
        {
            if (!out.fSpendable)
                 continue;
            nValueRet += out.tx->vout[out.i].nValue;
            setCoinsRet.insert(make_pair(out.tx, out.i));
        }
        return (nValueRet >= nTargetValue);
    }
    
    set<pair<const CWalletTx*, uint32_t> > setPresetCoins;
    CAmount nValueFromPresetInputs = 0;
    std::vector<COutPoint> vPresetInputs;
    if (coinControl)
        coinControl->ListSelected(vPresetInputs);
    BOOST_FOREACH(const COutPoint& outpoint, vPresetInputs)