1
0

network/gui: unify host/port input fields to single server str

This allows optionally specifying the protocol for the main server.

fixes #6095
fixes #5278
This commit is contained in:
SomberNight
2020-04-16 21:12:23 +02:00
parent b2cfaddff2
commit 9e57ae630b
5 changed files with 42 additions and 68 deletions

View File

@@ -53,7 +53,7 @@ from . import bitcoin
from . import dns_hacks
from .transaction import Transaction
from .blockchain import Blockchain, HEADER_SIZE
from .interface import (Interface,
from .interface import (Interface, PREFERRED_NETWORK_PROTOCOL,
RequestTimedOut, NetworkTimeout, BUCKET_NAME_OF_ONION_SERVERS,
NetworkException, RequestCorrupted, ServerAddr)
from .version import PROTOCOL_VERSION
@@ -75,10 +75,6 @@ NUM_TARGET_CONNECTED_SERVERS = 10
NUM_STICKY_SERVERS = 4
NUM_RECENT_SERVERS = 20
_KNOWN_NETWORK_PROTOCOLS = {'t', 's'}
PREFERRED_NETWORK_PROTOCOL = 's'
assert PREFERRED_NETWORK_PROTOCOL in _KNOWN_NETWORK_PROTOCOLS
def parse_servers(result: Sequence[Tuple[str, str, List[str]]]) -> Dict[str, dict]:
""" parse servers list into dict format"""