Commit Graph

3 Commits

Author SHA1 Message Date
Nicholas Dudfield
3a18dbcc53 feat: add NuDB block size tests and improve error handling
Incorporates changes from XRPLF/rippled PR #5468:

- Add getBlockSize() method to Backend interface
  Returns std::optional<std::size_t> for backends that support
  configurable block sizes (currently only NuDB)

- Update parseBlockSize() to throw exceptions instead of warnings
  Invalid block size configurations now throw std::runtime_error
  with descriptive error messages instead of silently using defaults

- Read existing database block size as default
  parseBlockSize() now checks existing nudb.key file for block size
  using nudb::block_size() before applying configuration

- Add comprehensive unit tests (NuDBFactory_test.cpp)
  Tests cover default sizes, valid sizes (4K-32K power-of-2),
  invalid sizes, error messages, power-of-2 validation, and
  data persistence across different block sizes

These changes improve configurability and error reporting while
maintaining backward compatibility.
2025-10-22 10:15:00 +07:00
Valon Mamudi
8d377199ce added configurable NuDB block size support in xahaud 2025-10-22 09:49:00 +07:00
J. Scott Branson
b3e6a902cb Update Sample Configuration Files in /cfg for Congruence with xahaud (#584) 2025-10-10 14:59:39 +11:00