|
31 | 31 |
|
32 | 32 | from simulaqron.local.setup import setup_local |
33 | 33 | from simulaqron.general.host_config import SocketsConfig |
34 | | -from simulaqron.settings import simulaqron_settings |
| 34 | +from simulaqron.settings import simulaqron_settings, network_config |
35 | 35 | from twisted.internet.defer import inlineCallbacks |
36 | 36 | from twisted.internet import reactor |
37 | 37 | from twisted.spread import pb |
@@ -117,11 +117,12 @@ def main(): |
117 | 117 |
|
118 | 118 | myName = "Alice" # we are Alice |
119 | 119 |
|
120 | | - # This file defines the network of virtual quantum nodes |
121 | | - virtualNet = SocketsConfig(str(simulaqron_settings.network_config_file), network_name="default", config_type="vnode") |
| 120 | + # This file defines the network of virtual quantum nodes and the network used for classical communication |
| 121 | + network_config.read_from_file("classicalNet.json") |
122 | 122 |
|
123 | | - # This file defines the network used for classical communication |
124 | | - classicalNet = SocketsConfig("classicalNet.json", network_name="default", config_type="app") |
| 123 | + # Using the config, we then get the right sockets configuration type |
| 124 | + virtualNet = SocketsConfig(network_config, network_name="default", config_type="vnode") |
| 125 | + classicalNet = SocketsConfig(network_config, network_name="default", config_type="app") |
125 | 126 |
|
126 | 127 | # Check if we should run a server (if this node is listed in classicalNet) |
127 | 128 | if myName in classicalNet.hostDict: |
|
0 commit comments