qt: show GetDefaultDBCache() in settings
What changed, and why it matters
This is a tiny user-interface change in Bitcoin Core's settings screen. It makes the displayed default database cache size match the value calculated by a shared helper function, instead of a hardcoded constant. There is no security issue visible in the change.
No security action needed. Treat as a normal UI consistency fix.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit replaces a hardcoded DEFAULT_DB_CACHE constant with a call to node::GetDefaultDBCache() when displaying the database cache size in the Qt options model. This is a consistency/correctness refactor so the GUI shows the same default as the node layer. The diff is one line and does not alter validation, network, wallet, or cryptographic logic.
Changed components
src/qt/optionsmodel.cppInspect captured patch +1 / −1
diff --git a/src/qt/optionsmodel.cpp b/src/qt/optionsmodel.cpp
index cfbc350f..d52c65d6 100644
--- a/src/qt/optionsmodel.cpp
+++ b/src/qt/optionsmodel.cpp
@@ -469,7 +469,7 @@ QVariant OptionsModel::getOption(OptionID option, const std::string& suffix) con
suffix.empty() ? getOption(option, "-prev") :
DEFAULT_PRUNE_TARGET_GB;
case DatabaseCache:
- return qlonglong(SettingTo<int64_t>(setting(), DEFAULT_DB_CACHE >> 20));
+ return qlonglong(SettingTo<int64_t>(setting(), node::GetDefaultDBCache() >> 20));
case ThreadsScriptVerif:
return qlonglong(SettingTo<int64_t>(setting(), DEFAULT_SCRIPTCHECK_THREADS));
case Listen:
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.