mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-30 08:51:32 +00:00
use ssl as default protocol
This commit is contained in:
parent
19cbe609a4
commit
84101a446b
3 changed files with 27 additions and 20 deletions
|
@ -31,7 +31,7 @@ from PyQt4.QtGui import *
|
|||
from PyQt4.QtCore import *
|
||||
import PyQt4.QtCore as QtCore
|
||||
import PyQt4.QtGui as QtGui
|
||||
from electrum.interface import DEFAULT_SERVERS
|
||||
from electrum.interface import DEFAULT_SERVERS, DEFAULT_PORTS
|
||||
from electrum.bitcoin import MIN_RELAY_TX_FEE
|
||||
|
||||
try:
|
||||
|
@ -2146,9 +2146,8 @@ class ElectrumWindow(QMainWindow):
|
|||
server_port = QLineEdit()
|
||||
server_port.setFixedWidth(60)
|
||||
|
||||
protocol_names = ['TCP', 'HTTP', 'TCP/SSL', 'HTTPS']
|
||||
protocol_names = ['TCP', 'HTTP', 'SSL', 'HTTPS']
|
||||
protocol_letters = 'thsg'
|
||||
DEFAULT_PORTS = {'t':'50001', 's':'50002', 'h':'8081', 'g':'8082'}
|
||||
server_protocol.addItems(protocol_names)
|
||||
|
||||
grid.addWidget(QLabel(_('Server') + ':'), 0, 0)
|
||||
|
@ -2184,8 +2183,8 @@ class ElectrumWindow(QMainWindow):
|
|||
if not port: protocol = None
|
||||
|
||||
if not protocol:
|
||||
if 't' in pp.keys():
|
||||
protocol = 't'
|
||||
if 's' in pp.keys():
|
||||
protocol = 's'
|
||||
port = pp.get(protocol)
|
||||
else:
|
||||
protocol = pp.keys()[0]
|
||||
|
@ -2209,7 +2208,8 @@ class ElectrumWindow(QMainWindow):
|
|||
host, port, protocol = server.split(':')
|
||||
change_server(host,protocol)
|
||||
|
||||
servers_list_widget.connect(servers_list_widget, SIGNAL('itemClicked(QTreeWidgetItem*, int)'), lambda x: change_server(unicode(x.text(0))))
|
||||
servers_list_widget.connect(servers_list_widget, SIGNAL('currentItemChanged(QTreeWidgetItem*,QTreeWidgetItem*)'),
|
||||
lambda x,y: change_server(unicode(x.text(0))))
|
||||
grid.addWidget(servers_list_widget, 1, 1, 1, 3)
|
||||
|
||||
if not wallet.config.is_modifiable('server'):
|
||||
|
|
|
@ -25,18 +25,23 @@ from util import print_error, print_msg
|
|||
|
||||
|
||||
DEFAULT_TIMEOUT = 5
|
||||
DEFAULT_PORTS = {'t':'50001', 's':'50002', 'h':'8081', 'g':'8082'}
|
||||
DEFAULT_SERVERS = [
|
||||
#'electrum.bitcoins.sk:50001:t',
|
||||
#'uncle-enzo.info:50001:t',
|
||||
#'electrum.bitfoo.org:50001:t',
|
||||
#'webbtc.net:50001:t',
|
||||
'electrum.bitcoin.cz:50001:t',
|
||||
'electrum.novit.ro:50001:t',
|
||||
'electrum.be:50001:t',
|
||||
'electrum.bysh.me:50001:t',
|
||||
'electrum.pdmc.net:50001:t',
|
||||
'electrum.no-ip.org:50001:t',
|
||||
'ecdsa.org:50001:t'
|
||||
'electrum.bitcoin.cz:50002:s',
|
||||
'electrum.novit.ro:50002:s',
|
||||
'electrum.be:50002:s',
|
||||
'electrum.bysh.me:50002:s',
|
||||
'electrum.pdmc.net:50002:s',
|
||||
'electrum.no-ip.org:50002:s',
|
||||
'ecdsa.org:50002:s',
|
||||
'electra.datemas.de:50002:s',
|
||||
'electrum.datemas.de:50002:s',
|
||||
'electrum.mooo.com:50002:s',
|
||||
'btcback.com:50002:s',
|
||||
'electrum.bitcoins.sk:50002:s',
|
||||
'btc.stytt.com:50002:s',
|
||||
'electrum.stepkrav.pw:50002:s',
|
||||
'btc.it-zone.org:110:s'
|
||||
]
|
||||
|
||||
# add only port 80 servers here
|
||||
|
@ -121,8 +126,10 @@ class Interface(threading.Thread):
|
|||
pruning = False
|
||||
if len(item) > 2:
|
||||
for v in item[2]:
|
||||
if re.match("[stgh]\d+", v):
|
||||
ports.append((v[0], v[1:]))
|
||||
if re.match("[stgh]\d*", v):
|
||||
protocol, port = v[0], v[1:]
|
||||
if port == '': port = DEFAULT_PORTS[protocol]
|
||||
ports.append((protocol, port))
|
||||
elif re.match("v(.?)+", v):
|
||||
version = v[1:]
|
||||
elif v == 'p':
|
||||
|
|
|
@ -1085,7 +1085,7 @@ class WalletSynchronizer(threading.Thread):
|
|||
self.wallet.receive_tx_callback(tx_hash, tx, tx_height)
|
||||
self.was_updated = True
|
||||
requested_tx.remove( (tx_hash, tx_height) )
|
||||
print_error("received tx:", tx)
|
||||
print_error("received tx:", tx_hash, len(tx.raw))
|
||||
|
||||
elif method == 'blockchain.transaction.broadcast':
|
||||
self.wallet.tx_result = result
|
||||
|
|
Loading…
Add table
Reference in a new issue