To help with to debugging and traceability (in alignment with displaying other non-default args such as Command-line arg: dbcache="10000"
) we can extend the LevelDB opening log with the used settings.
To avoid showing booleans as e.g. create_if_missing=1
, I’ve added a local ToString
lambda for bool
.
I wanted to use util::Join
at the end, but couldn’t find any way that I liked.
Example output after the change:
0025-01-16T10:47:35Z Opening LevelDB in /Users/lorinc/Library/Application Support/Bitcoin/blocks/index
12025-01-16T10:47:35Z Opened LevelDB successfully with options: options.compression=NoCompression, options.create_if_missing=true, options.max_file_size=33554432, options.paranoid_checks=true, options.write_buffer_size=524288, readoptions.fill_cache=false, readoptions.verify_checksums=true, writeoptions.sync=true
2...
32025-01-16T10:47:51Z Opening LevelDB in /Users/lorinc/Library/Application Support/Bitcoin/chainstate
42025-01-16T10:47:51Z Opened LevelDB successfully with options: options.compression=NoCompression, options.create_if_missing=true, options.max_file_size=33554432, options.paranoid_checks=true, options.write_buffer_size=2097152, readoptions.fill_cache=false, readoptions.verify_checksums=true, writeoptions.sync=true