mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-05 10:42:13 +02:00
Coins: Add kHeader to CDBBatch::size_estimate
The initialization of the manual `size_estimate` in `CDBBatch::Clear()` is corrected from `0` to `kHeader` (LevelDB's fixed batch header size). This aligns the manual estimate with LevelDB's actual size immediately after clearing, fixing discrepancies that would otherwise be caught by tests in the next commit (e.g., `coins_tests`, `validation_chainstatemanager_tests`).
This commit is contained in:
@@ -75,6 +75,8 @@ class CDBBatch
|
||||
friend class CDBWrapper;
|
||||
|
||||
private:
|
||||
static constexpr size_t kHeader{12}; // See: src/leveldb/db/write_batch.cc#L27
|
||||
|
||||
const CDBWrapper &parent;
|
||||
|
||||
struct WriteBatchImpl;
|
||||
|
||||
Reference in New Issue
Block a user