Skip to content

qt: transaction-list repaint during wallet encryption can still block on cs_wallet #180

Closed

Description

@kiwidream

Report

After #178, encrypting an existing wallet no longer blocks the GUI thread: status, keypool and transaction-table updates are cached or deferred while the worker holds cs_wallet. One path remains. If the transaction list or overview page is repainted during encryption, it resolves address labels through AddressTableModel::labelForAddress → interfaces::Wallet::getAddress, which takes LOCK(cs_wallet), so the GUI thread stalls until encryption finishes.

This takes an expose or repaint event while the application-modal encryption dialog is open, for example on an uncomposited X11 desktop. No dataChanged is emitted during encryption, so a normal session is unlikely to hit it. It is a stall, not a deadlock.

Expected

The GUI keeps repainting during encryption on every platform.

Possible fixes

  • Cache address labels in AddressTableModel or TransactionTableModel and answer from the cache while WalletModel::isEncryptingWallet().
  • Or add a try-lock variant of getAddress to interfaces::Wallet and fall back to the cached or blank label when the lock is held.

Acceptance

A Qt test repaints, or requests data() for, transaction rows with labels while a synthetic encryption is held open, and asserts the event loop stays responsive. It should reuse the watchdog pattern from WalletTests in #178.

Release tracking

A follow-up to #172 and #178. It is not a v1.0.1 blocker unless the maintainer decides otherwise (#174).

Activity

  1. kiwidream commented on Sep 25, 2026

    @kiwidream
    MemberAuthor

    Added to the v1.0.1 scope in #174. Work is in progress; the PR will link back here.

  2. added a commit that references this issue on Sep 28, 2026
    45e9e72
  3. added a commit that references this issue on Nov 12, 2026
    54f6737
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions