aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/rpc/backup.cpp
diff options
context:
space:
mode:
authorVasil Dimov <vd@FreeBSD.org>2023-12-14 12:23:36 +0100
committerVasil Dimov <vd@FreeBSD.org>2024-02-11 15:14:12 +0100
commitd3b3af90343b7671231afd7dff87e87ff86d31d7 (patch)
tree389aafdd51f646a5b554e2cf8bb957822456451e /src/wallet/rpc/backup.cpp
parent7143d4388407ab3d12005e55a02d5e8f334e4dc9 (diff)
downloadbitcoin-d3b3af90343b7671231afd7dff87e87ff86d31d7.tar.xz
log: deduplicate category names and improve logging.cpp
The code in `logging.cpp` needs to: * Get the category name given the flag (e.g. `BCLog::PRUNE` -> `"prune"`) * Get the flag given the category name (e.g. `"prune"` -> `BCLog::PRUNE`) * Get the list of category names sorted in alphabetical order Achieve this by using the proper std containers. The result is * less code (this diff is +62 / -129) * faster code (to linear search and no copy+sort) * more maintainable code (the categories are no longer duplicated in `LogCategories[]` and `LogCategoryToStr()`) This behavior is preserved: `BCLog::NONE` -> `""` (lookup by `LogCategoryToStr()`) `""` -> `BCLog::ALL` (lookup by `GetLogCategory("")`)
Diffstat (limited to 'src/wallet/rpc/backup.cpp')
0 files changed, 0 insertions, 0 deletions