correct arithmetic adjustments

Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
strawberry authored and June committed 2024-05-06 03:45:10 -04:00
1 parent 16a98b0683
commit 321e197d8c
12 files changed
+24 -53

No files matched your search

+2 -13
View File
@@ -402,19 +402,8 @@ impl KeyValueDatabase {
let sqlite_exists = path.join("conduit.db").exists();
let rocksdb_exists = path.join("IDENTITY").exists();
let mut count: u8 = 0;
if sqlite_exists {
count = count.saturating_add(1);
}
if rocksdb_exists {
count = count.saturating_add(1);
}
if count > 1 {
error!("Multiple databases at database_path detected");
return Ok(());
if sqlite_exists && rocksdb_exists {
return Err(Error::bad_config("Multiple databases at database_path detected."));
}
if sqlite_exists && config.database_backend != "sqlite" {