From 6d7dc6d183badc8aaf9c00cfacd14ab031b0c8e6 Mon Sep 17 00:00:00 2001 From: Avinash Sajjanshetty Date: Thu, 2 Oct 2025 16:01:56 +0530 Subject: [PATCH] enable checksums only if its opted in via feature flag --- core/storage/database.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/storage/database.rs b/core/storage/database.rs index c44aed214..79b7d0a7a 100644 --- a/core/storage/database.rs +++ b/core/storage/database.rs @@ -48,8 +48,12 @@ impl IOContext { impl Default for IOContext { fn default() -> Self { + #[cfg(feature = "checksum")] + let encryption_or_checksum = EncryptionOrChecksum::Checksum(ChecksumContext::default()); + #[cfg(not(feature = "checksum"))] + let encryption_or_checksum = EncryptionOrChecksum::None; Self { - encryption_or_checksum: EncryptionOrChecksum::Checksum(ChecksumContext::default()), + encryption_or_checksum, } } }