@@ -154,21 +154,8 @@ def _replace_instance_files(
154154 new_content = new_content .replace ("%%WEBSERVER_PORT%%" , str (instance_ports .webserver ))
155155 return new_content
156156
157- def _gen_legacy_topology (self , addr : str , ports : tp .Iterable [int ]) -> dict :
158- """Generate legacy topology for given ports."""
159- producers = [
160- {
161- "addr" : addr ,
162- "port" : port ,
163- "valency" : 1 ,
164- }
165- for port in ports
166- ]
167- topology = {"Producers" : producers }
168- return topology
169-
170157 def _gen_p2p_topology (self , addr : str , ports : list [int ], fixed_ports : list [int ]) -> dict :
171- """Generate p2p topology for given ports."""
158+ """Generate topology for given ports."""
172159 # Select fixed ports and several randomly selected ports
173160 rand_threshold = 3
174161 sample_ports = random .sample (ports , 3 ) if len (ports ) > rand_threshold else ports
@@ -234,23 +221,14 @@ def _gen_topology_files(
234221 all_except = all_nodes [:]
235222 all_except .remove (node_rec .node )
236223 node_name = "bft1" if node_rec .num == 0 else f"pool{ node_rec .num } "
237-
238- # Legacy topology
239-
240- topology = self ._gen_legacy_topology (addr = addr , ports = all_except )
241- helpers .write_json (out_file = destdir / f"topology-{ node_name } .json" , content = topology )
242-
243- # P2P topology
244-
245224 # Bft1 and first three pools
246225 fixed_ports = all_except [:4 ]
247226
248- p2p_topology = self ._gen_p2p_topology (
227+ topology_content = self ._gen_p2p_topology (
249228 addr = addr , ports = all_except , fixed_ports = fixed_ports
250229 )
251-
252230 helpers .write_json (
253- out_file = destdir / f"p2p- topology-{ node_name } .json" , content = p2p_topology
231+ out_file = destdir / f"topology-{ node_name } .json" , content = topology_content
254232 )
255233
256234 def _reconfigure_local (self , indir : pl .Path , destdir : pl .Path , instance_num : int ) -> None :
0 commit comments