feat(lite): add ObsidianDragonLite build mode and gate full-node features

Add --lite build flow and ObsidianDragonLite target naming, hide full-node pages/features in lite mode, enforce pool-only mining in lite, and include chat port feasibility audit documentation.
This commit is contained in:
2026-05-06 03:42:05 -05:00
parent 975743f754
commit e95ad50e41
10 changed files with 255 additions and 92 deletions

View File

@@ -60,6 +60,23 @@ using NetworkRefreshService = services::NetworkRefreshService;
namespace {
bool isPageEnabledForBuild(ui::NavPage page)
{
#if DRAGONX_LITE_BUILD
switch (page) {
case ui::NavPage::Console:
case ui::NavPage::Peers:
case ui::NavPage::Explorer:
return false;
default:
return true;
}
#else
(void)page;
return true;
#endif
}
std::string unencryptedTransactionHistoryCacheKey(const std::string& walletIdentity)
{
return std::string("obsidian-dragon-unencrypted-tx-cache-v1:") +
@@ -545,6 +562,9 @@ bool App::shouldRunWalletTransactionRefresh() const
void App::setCurrentPage(ui::NavPage page)
{
if (!isPageEnabledForBuild(page)) {
page = ui::NavPage::Overview;
}
if (page == current_page_) return;
current_page_ = page;
applyRefreshPolicy(page);
@@ -1372,6 +1392,11 @@ void App::refreshMarketData()
void App::startMining(int threads)
{
#if DRAGONX_LITE_BUILD
(void)threads;
ui::Notifications::instance().warning("Solo mining is unavailable in lite build");
return;
#endif
if (!state_.connected || !rpc_ || !worker_) return;
if (mining_toggle_in_progress_.exchange(true)) return; // already in progress
@@ -1401,6 +1426,9 @@ void App::startMining(int threads)
void App::stopMining()
{
#if DRAGONX_LITE_BUILD
return;
#endif
if (!state_.connected || !rpc_ || !worker_) return;
if (mining_toggle_in_progress_.exchange(true)) return; // already in progress