Update the ISecureConn interface following the reference and simplify accordingly

This commit is contained in:
Alex Stokes
2019-08-02 16:04:46 -07:00
parent ab7653526f
commit 1e5357a1e1
7 changed files with 45 additions and 98 deletions

View File

@ -92,8 +92,10 @@ def initialize_default_swarm(
# TODO TransportUpgrader is not doing anything really
# TODO parse muxer and sec to pass into TransportUpgrader
muxer = muxer_opt or ["mplex/6.7.0"]
sec = sec_opt or {TProtocol("insecure/1.0.0"): InsecureTransport("insecure")}
upgrader = TransportUpgrader(sec, muxer)
security_transports_by_protocol = sec_opt or {
TProtocol("insecure/1.0.0"): InsecureTransport()
}
upgrader = TransportUpgrader(security_transports_by_protocol, muxer)
peerstore = peerstore_opt or PeerStore()
# TODO: Initialize discovery if not presented