@@ -29,6 +29,7 @@ use crate::scenario::{Scenario, ScenarioId, ScenarioStep};
2929
3030use self :: multi_node:: basic_connectivity_initial_joining:: MultiNodeBasicConnectivityInitialJoining ;
3131use self :: multi_node:: basic_connectivity_peer_discovery:: MultiNodeBasicConnectivityPeerDiscovery ;
32+ use self :: multi_node:: connection_discovery:: RustNodeAsSeed as P2pConnectionDiscoveryRustNodeAsSeed ;
3233use self :: multi_node:: pubsub_advanced:: MultiNodePubsubPropagateBlock ;
3334use self :: multi_node:: sync_4_block_producers:: MultiNodeSync4BlockProducers ;
3435use self :: multi_node:: vrf_correct_ledgers:: MultiNodeVrfGetCorrectLedgers ;
@@ -68,6 +69,7 @@ pub enum Scenarios {
6869 SimulationSmallForeverRealTime ( SimulationSmallForeverRealTime ) ,
6970 P2pReceiveBlock ( P2pReceiveBlock ) ,
7071 P2pSignaling ( P2pSignaling ) ,
72+ P2pConnectionDiscoveryRustNodeAsSeed ( P2pConnectionDiscoveryRustNodeAsSeed ) ,
7173 MultiNodePubsubPropagateBlock ( MultiNodePubsubPropagateBlock ) ,
7274 RecordReplayBootstrap ( RecordReplayBootstrap ) ,
7375 RecordReplayBlockProduction ( RecordReplayBlockProduction ) ,
@@ -152,12 +154,25 @@ impl Scenarios {
152154 Self :: SimulationSmallForeverRealTime ( _) => SimulationSmallForeverRealTime :: DOCS ,
153155 Self :: P2pReceiveBlock ( _) => P2pReceiveBlock :: DOCS ,
154156 Self :: P2pSignaling ( _) => P2pSignaling :: DOCS ,
157+ Self :: P2pConnectionDiscoveryRustNodeAsSeed ( _) => {
158+ P2pConnectionDiscoveryRustNodeAsSeed :: DOCS
159+ }
155160 Self :: MultiNodePubsubPropagateBlock ( _) => MultiNodePubsubPropagateBlock :: DOCS ,
156161 Self :: RecordReplayBootstrap ( _) => RecordReplayBootstrap :: DOCS ,
157162 Self :: RecordReplayBlockProduction ( _) => RecordReplayBlockProduction :: DOCS ,
158163 }
159164 }
160165
166+ pub fn default_cluster_config ( self ) -> Result < ClusterConfig , anyhow:: Error > {
167+ let config = ClusterConfig :: new ( None )
168+ . map_err ( |err| anyhow:: anyhow!( "failed to create cluster configuration: {err}" ) ) ?;
169+
170+ match self {
171+ Self :: P2pSignaling ( v) => v. default_cluster_config ( config) ,
172+ _ => Ok ( config) ,
173+ }
174+ }
175+
161176 pub fn blank_scenario ( self ) -> Scenario {
162177 let mut scenario = Scenario :: new ( self . id ( ) , self . parent_id ( ) ) ;
163178 scenario. set_description ( self . description ( ) . to_owned ( ) ) ;
@@ -189,6 +204,7 @@ impl Scenarios {
189204 Self :: SimulationSmallForeverRealTime ( v) => v. run ( runner) . await ,
190205 Self :: P2pReceiveBlock ( v) => v. run ( runner) . await ,
191206 Self :: P2pSignaling ( v) => v. run ( runner) . await ,
207+ Self :: P2pConnectionDiscoveryRustNodeAsSeed ( v) => v. run ( runner) . await ,
192208 Self :: MultiNodePubsubPropagateBlock ( v) => v. run ( runner) . await ,
193209 Self :: RecordReplayBootstrap ( v) => v. run ( runner) . await ,
194210 Self :: RecordReplayBlockProduction ( v) => v. run ( runner) . await ,
0 commit comments