Add an encrypted SQLite transaction history cache with cached tip metadata and per-address shielded scan progress so startup and full refreshes avoid re-scanning every z-address while still invalidating on wallet/address/rescan changes. Improve wallet history loading by paging transparent transactions, preserving cached shielded and sent rows, keeping recent/unconfirmed activity visible, and classifying mining-address receives. Show z_sendmany opid sends immediately in History and Overview, pin pending rows through refreshes, and apply optimistic address/balance debits until opids resolve. Add timestamped RPC console tracing by source/method without logging params or results, reduce redundant refresh/RPC calls, and cache Explorer recent block summaries in SQLite. Expand focused tests for transaction cache encryption, scan-progress persistence/invalidation, history preservation, operation-status parsing, pending send visibility, and Explorer/RPC refresh behavior.
35 lines
1.0 KiB
C++
35 lines
1.0 KiB
C++
#include "console_output_model.h"
|
|
|
|
#include <algorithm>
|
|
#include <cctype>
|
|
|
|
namespace dragonx {
|
|
namespace ui {
|
|
|
|
namespace {
|
|
std::string lowerCopy(std::string value)
|
|
{
|
|
std::transform(value.begin(), value.end(), value.begin(),
|
|
[](unsigned char c) { return static_cast<char>(std::tolower(c)); });
|
|
return value;
|
|
}
|
|
}
|
|
|
|
bool consoleLinePassesFilter(const std::string& lineText,
|
|
ImU32 lineColor,
|
|
const ConsoleOutputFilter& filter)
|
|
{
|
|
if (!filter.daemonMessagesEnabled && lineColor == filter.daemonColor) return false;
|
|
if (!filter.rpcTraceEnabled && lineColor == filter.rpcTraceColor) return false;
|
|
if (filter.errorsOnly && lineColor != filter.errorColor) return false;
|
|
if (!filter.text.empty()) {
|
|
std::string needle = lowerCopy(filter.text);
|
|
std::string haystack = lowerCopy(lineText);
|
|
if (haystack.find(needle) == std::string::npos) return false;
|
|
}
|
|
return true;
|
|
}
|
|
|
|
} // namespace ui
|
|
} // namespace dragonx
|