From 3e474882d6d8ea4f4a68ce6ec021780e6b76c477 Mon Sep 17 00:00:00 2001 From: Nicholas Dudfield Date: Wed, 20 Aug 2025 13:45:20 +0700 Subject: [PATCH] docs: clarify KB rounding behavior in RWDB memory assertions --- src/test/rdb/RelationalDatabase_test.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/test/rdb/RelationalDatabase_test.cpp b/src/test/rdb/RelationalDatabase_test.cpp index 63ae6bad0..8f4ea3907 100644 --- a/src/test/rdb/RelationalDatabase_test.cpp +++ b/src/test/rdb/RelationalDatabase_test.cpp @@ -565,10 +565,12 @@ public: if (backend == "rwdb") { // RWDB reports actual data memory (rounded down to KB) - // Initially should be < 1KB, so rounds to 0 - BEAST_EXPECT(allKB == 0); - BEAST_EXPECT(ledgerKB == 0); - BEAST_EXPECT(txKB == 0); + // Initially should be < 1KB, so rounds down to 0 + // Note: These are 0 due to rounding, not because there's literally + // no data + BEAST_EXPECT(allKB == 0); // < 1024 bytes rounds to 0 KB + BEAST_EXPECT(ledgerKB == 0); // < 1024 bytes rounds to 0 KB + BEAST_EXPECT(txKB == 0); // < 1024 bytes rounds to 0 KB } else {