This is to track the regression introduced in master, which needs fixing for 0.14. See #9240, #9371, etc.
return true;
}
void CWallet::MarkDirty()
{
    {
        LOCK(cs_wallet);
        BOOST_FOREACH(PAIRTYPE(const uint256, CWalletTx)& item, mapWallet)
            item.second.MarkDirty();
    }
}
bool CWallet::MarkReplaced(const uint256& originalHash, const uint256& newHash)
{
    LOCK(cs_wallet);
    auto mi = mapWallet.find(originalHash);
    
    assert(mi != mapWallet.end());
    CWalletTx& wtx = (*mi).second;
    
    assert(wtx.mapValue.count("replaced_by_txid") == 0);
    wtx.mapValue["replaced_by_txid"] = newHash.ToString();
    CWalletDB walletdb(strWalletFile, "r+");
    bool success = true;
    if (!walletdb.WriteTx(wtx)) {
        LogPrintf("%s: Updating walletdb tx %s failed", __func__, wtx.GetHash().ToString());
        success = false;
    }
    NotifyTransactionChanged(this, originalHash, CT_UPDATED);
    return success;
}
bool CWallet::AddToWallet(const CWalletTx& wtxIn, bool fFlushOnClose)