mirror of
https://github.com/alexgo-io/stacks-puppet-node.git
synced 2026-04-21 18:32:04 +08:00
ports 6264 and 16264 don't use ssl
This commit is contained in:
@@ -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'
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user