mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 20:42:59 +01:00
Enable paranoid corruption checks in LevelDB >= 1.16
This commit is contained in:
parent
029f4904d1
commit
cd01a5e185
@ -32,6 +32,11 @@ static leveldb::Options GetOptions(size_t nCacheSize) {
|
||||
options.filter_policy = leveldb::NewBloomFilterPolicy(10);
|
||||
options.compression = leveldb::kNoCompression;
|
||||
options.max_open_files = 64;
|
||||
if (leveldb::kMajorVersion > 1 || (leveldb::kMajorVersion == 1 && leveldb::kMinorVersion >= 16)) {
|
||||
// LevelDB versions before 1.16 consider short writes to be corruption. Only trigger error
|
||||
// on corruption in later versions.
|
||||
options.paranoid_checks = true;
|
||||
}
|
||||
return options;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user