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

{
    
    std::vector<CWalletTx> vWtx;
    if (GetBoolArg("-zapwallettxes", false)) {
        uiInterface.InitMessage(_("Zapping all transactions from wallet..."));
        CWallet *tempWallet = new CWallet(strWalletFile);
        DBErrors nZapWalletRet = tempWallet->ZapWalletTx(vWtx);
        if (nZapWalletRet != DB_LOAD_OK) {
            errorString = strprintf(_("Error loading %s: Wallet corrupted"), strWalletFile);
            uiInterface.InitMessage(strprintf(_("Error loading %s: Wallet corrupted"), strWalletFile));
            return NULL;
        }
        delete tempWallet;
        tempWallet = NULL;
    }
    uiInterface.InitMessage(_("Loading wallet..."));
    int64_t nStart = GetTimeMillis();
    bool fFirstRun = true;
    CWallet *walletInstance = new CWallet(strWalletFile);
    DBErrors nLoadWalletRet = walletInstance->LoadWallet(fFirstRun);
    if (nLoadWalletRet != DB_LOAD_OK)
    {
        if (nLoadWalletRet == DB_CORRUPT)
            errorString += strprintf(_("Error loading %s: Wallet corrupted"), strWalletFile) + "\n";
        else if (nLoadWalletRet == DB_NONCRITICAL_ERROR)
        {
            warningString += strprintf(_("Error reading %s! All keys read correctly, but transaction data"
                                         " or address book entries might be missing or incorrect."),
                strWalletFile);