feat(wallet): persist history and surface pending sends
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.
This commit is contained in:
@@ -26,7 +26,7 @@ namespace ui {
|
||||
class ConsoleTab {
|
||||
public:
|
||||
ConsoleTab();
|
||||
~ConsoleTab() = default;
|
||||
~ConsoleTab();
|
||||
|
||||
/**
|
||||
* @brief Render the console tab
|
||||
@@ -46,6 +46,7 @@ public:
|
||||
* @brief Add a line to the console output
|
||||
*/
|
||||
void addLine(const std::string& line, ImU32 color = IM_COL32(200, 200, 200, 255));
|
||||
void addRpcTraceLine(const std::string& source, const std::string& method);
|
||||
|
||||
/**
|
||||
* @brief Clear console output
|
||||
@@ -69,6 +70,9 @@ public:
|
||||
// Show only error messages (filter toggle)
|
||||
static bool s_errors_only_enabled;
|
||||
|
||||
// Show app RPC calls made through RPCClient (method/source only)
|
||||
static bool s_rpc_trace_enabled;
|
||||
|
||||
/// Refresh console text colors for current theme (call after theme switch)
|
||||
static void refreshColors();
|
||||
|
||||
@@ -78,6 +82,7 @@ public:
|
||||
static ImU32 COLOR_ERROR;
|
||||
static ImU32 COLOR_DAEMON;
|
||||
static ImU32 COLOR_INFO;
|
||||
static ImU32 COLOR_RPC;
|
||||
|
||||
private:
|
||||
struct ConsoleLine {
|
||||
@@ -129,6 +134,13 @@ private:
|
||||
float output_scroll_y_ = 0.0f; // Track scroll position for selection
|
||||
ImVec2 output_origin_ = {0, 0}; // Top-left of output area
|
||||
float output_line_height_ = 0.0f; // Text line height (for scanline alignment)
|
||||
|
||||
struct ScanlineRow {
|
||||
float yTop = 0.0f;
|
||||
float yBot = 0.0f;
|
||||
int rowIndex = 0;
|
||||
};
|
||||
std::vector<ScanlineRow> scanline_rows_;
|
||||
|
||||
std::mutex lines_mutex_;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user