Read payment-request files asynchronously and reject stale delivery #978

Open
opened 2026-10-02 17:37:59 +00:00 by johnny9 · 0 comments
johnny9 commented 2026-10-02 17:37:59 +00:00 (Migrated from github.com)

Parent: #927. Follow-up to closed #541, covering asynchronous reads, stale results and limits on pending requests.

Opening or dropping a payment-request file can block Send while parseBitcoinUriFromFile() opens, inspects and reads it. The size guard limits input length, not latency on slow or network-mounted storage. This is filesystem I/O; ordinary in-memory URI parsing does not need the same treatment.

Read and parse files outside the GUI thread, with clear pending and error feedback. Associate each result with its request and destination. Reject late results after a newer import, wallet change, recipient edit, navigation or form replacement. Bound or coalesce repeated import work so requests cannot accumulate behind a slow read.

Preserve local file URLs, size and parse checks, actionable errors and existing overwrite behavior. Define shutdown behavior without waiting on the GUI thread; discarding a result must not be described as interrupting a blocked read.

Acceptance should cover delayed reads, repeated imports, navigation, edits while pending, shutdown, missing/unreadable or oversized files and invalid content. Keep PSBT import under #924.

Parent: #927. Follow-up to closed #541, covering asynchronous reads, stale results and limits on pending requests. Opening or dropping a payment-request file can block Send while `parseBitcoinUriFromFile()` opens, inspects and reads it. The size guard limits input length, not latency on slow or network-mounted storage. This is filesystem I/O; ordinary in-memory URI parsing does not need the same treatment. Read and parse files outside the GUI thread, with clear pending and error feedback. Associate each result with its request and destination. Reject late results after a newer import, wallet change, recipient edit, navigation or form replacement. Bound or coalesce repeated import work so requests cannot accumulate behind a slow read. Preserve local file URLs, size and parse checks, actionable errors and existing overwrite behavior. Define shutdown behavior without waiting on the GUI thread; discarding a result must not be described as interrupting a blocked read. Acceptance should cover delayed reads, repeated imports, navigation, edits while pending, shutdown, missing/unreadable or oversized files and invalid content. Keep PSBT import under #924.
Sign in to join this conversation.
No description provided.