X-Git-Url: https://git.novaco.in/?a=blobdiff_plain;f=src%2Fdb.cpp;fp=src%2Fdb.cpp;h=5b6d66b12e296fcaf8fdab55e4aac38b5e8123d3;hb=b1a1f9e9693114bfea4118828fb08ff19ea9f006;hp=7ee93cf1edf253311555ba69627ca18ff15359a6;hpb=557e64604afb73df48dd4ea0465ad75e7f9a67fe;p=novacoin.git diff --git a/src/db.cpp b/src/db.cpp index 7ee93cf..5b6d66b 100644 --- a/src/db.cpp +++ b/src/db.cpp @@ -107,31 +107,6 @@ bool CDBEnv::Open(boost::filesystem::path pathEnv_) fDbEnvInit = true; fMockDb = false; -#ifndef USE_LEVELDB - // Check that the number of locks is sufficient (to prevent chain fork possibility, read http://bitcoin.org/may15 for more info) - u_int32_t nMaxLocks; - if (!dbenv.get_lk_max_locks(&nMaxLocks)) - { - int nBlocks, nDeepReorg; - std::string strMessage; - - nBlocks = nMaxLocks / 48768; - nDeepReorg = (nBlocks - 1) / 2; - - printf("Final lk_max_locks is %u, sufficient for (worst case) %d block%s in a single transaction (up to a %d-deep reorganization)\n", nMaxLocks, nBlocks, (nBlocks == 1) ? "" : "s", nDeepReorg); - if (nDeepReorg < 3) - { - if (nBlocks < 1) - strMessage = strprintf(_("Warning: DB_CONFIG has set_lk_max_locks %u, which may be too low for a single block. If this limit is reached, NovaCoin may stop working."), nMaxLocks); - else - strMessage = strprintf(_("Warning: DB_CONFIG has set_lk_max_locks %u, which may be too low for a common blockchain reorganization. If this limit is reached, NovaCoin may stop working."), nMaxLocks); - - strMiscWarning = strMessage; - printf("*** %s\n", strMessage.c_str()); - } - } -#endif - return true; }