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.
Fixes the use of high and low in variable names, as these are determined by ripple::keylet::line processing.
Co-authored-by: RichardAH <richard.holland@starstone.co.nz>
std::endl triggers flush() which calls sync() on the shared log buffer.
Multiple threads racing in sync() cause str()/str("") operations to
corrupt buffer state, leading to crashes and double frees.
Added mutex to serialize access to suite.log, preventing concurrent
sync() calls on the same buffer.
* Match unit tests on start of test name (#4634)
* For example, without this change, to run the TxQ tests, must specify
`--unittest=TxQ1,TxQ2` on the command line. With this change, can use
`--unittest=TxQ`, and both will be run.
* An exact match will prevent any further partial matching.
* This could have some side effects for different tests with a common
name beginning. For example, NFToken, NFTokenBurn, NFTokenDir. This
might be useful. If not, the shorter-named test(s) can be renamed. For
example, NFToken to NFTokens.
* Split the NFToken, NFTokenBurn, and Offer test classes. Potentially speeds
up parallel tests by a factor of 5.
* SetHook_test, SetHookTSH_test, XahauGenesis_test
---------
Co-authored-by: Ed Hennis <ed@ripple.com>