perf(net): one balance scan per poll, filtered opstatus, a guarded merge scope

The Core poll ran z_gettotalbalance twice (minconf 0 and 1), each a whole-
wallet scan under dragonxd's cs_main. The spendable (minconf=1) call now
runs only after the display call succeeded, and only when something is
unconfirmed or pending or the exact total moved: about 95% of polls make
one scan instead of two. A forced post-send balance can no longer be lost
to a refused enqueue, and pending-send debits aren't re-applied each tick.

z_getoperationstatus is filtered to our opids with its real argument form
([[id,...]]; the old ["id"] was rejected), falling back to the unfiltered
call if a daemon refuses the filter. The Shield/Merge dialog's own polls
are filtered and session-guarded too, and finally reach Done; the dead
RPCClient wrappers are deleted.

The Merge/Consolidate scope scan becomes a tested state machine: one scan
at a time, failures latch behind a Retry button, only "node not ready"
retries by itself (10/30/60 s, at most 3), Lite never scans. Its 120 s
calls are maintenance calls: every main-thread disconnect aborts one in
flight first, so a lifecycle action no longer freezes the UI behind it.
An aborted merge that was already sent says it may still go through.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-09 11:06:34 -05:00
co-authored by Claude Opus 5.5
parent 4eed4283d6
commit 8b9a498eee
23 changed files with 1044 additions and 128 deletions
+5
View File
@@ -1178,10 +1178,12 @@
"merge_keep_each_status_failed": "%s: falló: %s",
"merge_keep_each_status_not_started": "%s: no iniciado: %s",
"merge_keep_each_status_running": "%s: fusionando %d notas (%d de %d lotes listos)…",
"merge_keep_each_status_unconfirmed": "%s: no se pudo confirmar el estado",
"merge_keep_each_too_small": "Demasiado poco para consolidar: la comisión se llevaría estos fondos.",
"merge_max_inputs": "Máximo de entradas por lote",
"merge_no_spendable": "Aún no hay entradas disponibles para consolidar.",
"merge_progress": "Consolidando… esto puede tardar varios minutos. Puedes cerrar esta ventana.",
"merge_scope_failed_fmt": "No se pudieron leer tus entradas: %s",
"merge_scope_fmt": "%d entradas transparentes + %d blindadas · ~%s DRGX disponibles",
"merge_scope_loading": "Comprobando tus entradas…",
"merge_send_failed": "Error al fusionar: ",
@@ -1190,7 +1192,10 @@
"merge_src_shielded": "Blindadas",
"merge_src_transparent": "Transparentes",
"merge_started": "Operación de fusión iniciada",
"merge_submit_uncertain": "El nodo no confirmó la fusión antes de que se interrumpiera la conexión. Puede que aún se complete: revisa el Historial tras reconectar antes de fusionar de nuevo.",
"merge_title": "Fusionar a Dirección",
"merge_wait_locked": "La cartera está bloqueada. Desbloquéala para continuar.",
"merge_waiting_node": "Esperando al nodo…",
"merge_where": "¿Adónde deben ir los fondos?",
"mig_adopt": "Hacer que esta sea mi cartera",
"mig_adopt_now": "Adoptar cartera con frase",