Simpler InterfaceInfo. Loopback literals are now localhost.

pull/424/head
jMyles 2018-08-06 20:47:51 -04:00
parent 6567a7b7bf
commit 07fe4f9b30
4 changed files with 12 additions and 8 deletions

View File

@ -116,7 +116,7 @@ class ProxyRESTServer:
tls_hosting_keypair = HostingKeypair(common_name=self.checksum_public_address,
private_key=tls_private_key,
curve=tls_curve,
host=host,
host=rest_host,
certificate=certificate)
tls_hosting_power = TLSHostingPower(keypair=tls_hosting_keypair)
self._crypto_power.consume_power_up(tls_hosting_power)

View File

@ -48,7 +48,7 @@ def make_ursulas(ether_addresses: list,
if bare:
ursula = Ursula(is_me=False, # do not attach dht server
rest_host="127.0.0.1", # TODO: remove rest interface
rest_host="localhost", # TODO: remove rest interface
rest_port=port + 100,
checksum_address=ether_address,
always_be_learning=False,
@ -64,10 +64,10 @@ def make_ursulas(ether_addresses: list,
ether_address = None
ursula = Ursula(is_me=True,
checksum_address=ether_address,
dht_host="127.0.0.1",
dht_host="localhost",
dht_port=port,
db_name="test-{}".format(port),
rest_host="127.0.0.1",
rest_host="localhost",
rest_port=port+100,
always_be_learning=False,
miner_agent=miner_agent,
@ -109,7 +109,7 @@ def make_ursulas(ether_addresses: list,
event_loop.run_until_complete(
ursula.dht_server.bootstrap(
[("127.0.0.1", starting_port + _c) for _c in range(len(ursulas))]))
[("localhost", starting_port + _c) for _c in range(len(ursulas))]))
ursula.publish_dht_information()
return ursulas

View File

@ -41,10 +41,10 @@
;stake=only
;
;[ursula.network.rest]
;host=127.0.0.1
;host=localhost
;port=5115
;db_name=ursula.db.sqlite3
;
;[ursula.network.dht]
;host=127.0.0.1
;host=localhost
;port=5867

View File

@ -7,6 +7,7 @@ from tests.utilities import make_ursulas
from twisted.internet import threads
from nucypher.characters import Ursula
from nucypher.utilities.blockchain import make_ursulas
from nucypher.utilities.sandbox import make_ursulas
@ -45,3 +46,6 @@ def test_nodes_connect_via_tls_and_verify():
yield threads.deferToThread(check_node_with_cert, node, "test-cert")
finally:
os.remove("test-cert")
#
# def test_node_metadata_contains_proper_cert():