HomePhabricator

[electrum] network_dialog: Validate hosts and ports

Description

[electrum] network_dialog: Validate hosts and ports

Summary:
This adds a new HostValidator class to validate hostnames and IP
addresses entered into a QLineEdit. We use this class to validate the
server and proxy host.

This also adds the existing PortValidator class to the server and
proxy port widgets.

fixes electroncash#2743

This is a backport of electroncash#2744

Test Plan: Run the GUI, test the server host, server port, proxy host and proxy port fields. Invalid hostnames or ports should cause the widget to have a red border.

Reviewers: #bitcoin_abc, bytesofman

Reviewed By: #bitcoin_abc, bytesofman

Subscribers: bytesofman

Differential Revision: https://reviews.bitcoinabc.org/D15195

Details

Provenance
EchterAgoAuthored on Nov 26 2023, 07:02
PiRKCommitted on Jan 18 2024, 12:17
PiRKPushed on Jan 18 2024, 12:17
Reviewer
Restricted Project
Differential Revision
D15195: [electrum] network_dialog: Validate hosts and ports
Parents
rABC7154ba1d5668: [avalanche] Make the BlockFinalized validation callback asynchronous
Branches
Unknown
Tags
Unknown