ports 6264 and 16264 don't use ssl

This commit is contained in:
Jude Nelson
2018-01-19 17:33:43 -05:00
parent 6501d2bffd
commit 06cfae1aaa
2 changed files with 4 additions and 3 deletions

View File

@@ -35,7 +35,7 @@ import json
import storage
from .util import url_to_host_port
from .config import MAX_RPC_LEN, BLOCKSTACK_TEST, BLOCKSTACK_DEBUG, RPC_SERVER_PORT, LENGTHS, RPC_DEFAULT_TIMEOUT
from .config import MAX_RPC_LEN, BLOCKSTACK_TEST, BLOCKSTACK_DEBUG, RPC_SERVER_PORT, RPC_SERVER_TEST_PORT, LENGTHS, RPC_DEFAULT_TIMEOUT
import virtualchain
@@ -306,7 +306,7 @@ def connect_hostport(hostport, timeout=RPC_DEFAULT_TIMEOUT, my_hostport=None):
assert host is not None and port is not None
protocol = None
if port == RPC_SERVER_PORT:
if port == RPC_SERVER_PORT or port == RPC_SERVER_TEST_PORT:
protocol = 'http'
else:
protocol = 'https'

View File

@@ -127,9 +127,10 @@ if os.environ.get("BLOCKSTACK_CORE_NUM_CONFS", None) is not None:
""" RPC server configs
"""
RPC_SERVER_TEST_PORT = 16264
RPC_SERVER_PORT = None # non-HTTPS port
if BLOCKSTACK_TEST is not None:
RPC_SERVER_PORT = 16264
RPC_SERVER_PORT = RPC_SERVER_TEST_PORT
else:
RPC_SERVER_PORT = 6264