X-Git-Url: https://git.novaco.in/?p=novacoin.git;a=blobdiff_plain;f=src%2Fdb.cpp;h=cc069e15d3228fae1ccf8cce2a9624db6028c22f;hp=0a8c8be9d1665138604a0a590823c0d551c21ce0;hb=d8f8063eda45b8dec864b28bb98839a2dd3a8170;hpb=68fbc35ade50af7e8b0ec0fe80e9a1372bccba2c diff --git a/src/db.cpp b/src/db.cpp index 0a8c8be..cc069e1 100644 --- a/src/db.cpp +++ b/src/db.cpp @@ -111,31 +111,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 %lu, sufficient for (worst case) %d block%s in a single transaction (up to a %d-deep reorganization)\n", (unsigned long)nMaxLocks, nBlocks, (nBlocks == 1) ? "" : "s", nDeepReorg); - if (nDeepReorg < 3) - { - if (nBlocks < 1) - strMessage = strprintf(_("Warning: DB_CONFIG has set_lk_max_locks %lu, which may be too low for a single block. If this limit is reached, NovaCoin may stop working."), (unsigned long)nMaxLocks); - else - strMessage = strprintf(_("Warning: DB_CONFIG has set_lk_max_locks %lu, which may be too low for a common blockchain reorganization. If this limit is reached, NovaCoin may stop working."), (unsigned long)nMaxLocks); - - strMiscWarning = strMessage; - printf("*** %s\n", strMessage.c_str()); - } - } -#endif - return true; }