X-Git-Url: https://git.novaco.in/?a=blobdiff_plain;f=src%2Ftxdb-bdb.cpp;h=5ce59b5aa41ec2cc246926dbc73cf0e7bdcb04cc;hb=1ebe5b92ef18395cdae9b88fc38b0ed6166c3243;hp=0df61fe9bfe3ce298cf3c1271d61b19165fbefde;hpb=77a43545b4491b9703d803765da9059d2bdd5aaa;p=novacoin.git diff --git a/src/txdb-bdb.cpp b/src/txdb-bdb.cpp index 0df61fe..5ce59b5 100644 --- a/src/txdb-bdb.cpp +++ b/src/txdb-bdb.cpp @@ -160,7 +160,7 @@ CBlockIndex static * InsertBlockIndex(uint256 hash) return (*mi).second; // Create new - CBlockIndex* pindexNew = new CBlockIndex(); + CBlockIndex* pindexNew = new(nothrow) CBlockIndex(); if (!pindexNew) throw runtime_error("LoadBlockIndex() : new CBlockIndex failed"); mi = mapBlockIndex.insert(make_pair(hash, pindexNew)).first; @@ -223,8 +223,8 @@ bool CTxDB::LoadBlockIndex() nBestInvalidTrust = bnBestInvalidTrust.getuint256(); // Verify blocks in the best chain - int nCheckLevel = GetArg("-checklevel", 1); - int nCheckDepth = GetArg( "-checkblocks", 2500); + int nCheckLevel = GetArgInt("-checklevel", 1); + int nCheckDepth = GetArgInt( "-checkblocks", 2500); if (nCheckDepth == 0) nCheckDepth = 1000000000; // suffices until the year 19000 if (nCheckDepth > nBestHeight) @@ -424,7 +424,7 @@ bool CTxDB::LoadBlockIndexGuts() break; // if shutdown requested or finished loading block index } } // try - catch (std::exception &e) { + catch (const std::exception&) { return error("%s() : deserialize error", BOOST_CURRENT_FUNCTION); } }