File tree Expand file tree Collapse file tree
guest-agent-simulator/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -125,7 +125,7 @@ async fn main() -> Result<()> {
125125 }
126126 let attestation =
127127 simulator:: load_versioned_attestation ( & sim_config. simulator . attestation_file ) ?;
128- let state = AppState :: new (
128+ let state = AppState :: new_with_platform (
129129 sim_config. core ,
130130 Arc :: new ( SimulatorPlatform :: new (
131131 attestation,
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ async fn main() -> Result<()> {
2727 }
2828 let args = Args :: parse ( ) ;
2929 let figment = config:: load_config_figment ( args. config . as_deref ( ) ) ;
30- let state = AppState :: new_real ( figment. focus ( "core" ) . extract ( ) ?)
30+ let state = AppState :: new ( figment. focus ( "core" ) . extract ( ) ?)
3131 . await
3232 . context ( "Failed to create app state" ) ?;
3333 run_server ( state, figment, args. watchdog ) . await
Original file line number Diff line number Diff line change @@ -132,7 +132,10 @@ impl AppState {
132132 } ) ;
133133 }
134134
135- pub async fn new ( config : Config , platform : Arc < dyn PlatformBackend > ) -> Result < Self > {
135+ pub async fn new_with_platform (
136+ config : Config ,
137+ platform : Arc < dyn PlatformBackend > ,
138+ ) -> Result < Self > {
136139 let keys: AppKeys = serde_json:: from_str ( & fs:: read_to_string ( & config. keys_file ) ?)
137140 . context ( "Failed to parse app keys" ) ?;
138141 let sys_config: SysConfig =
@@ -157,8 +160,8 @@ impl AppState {
157160 Ok ( me)
158161 }
159162
160- pub async fn new_real ( config : Config ) -> Result < Self > {
161- Self :: new ( config, Arc :: new ( RealPlatform ) ) . await
163+ pub async fn new ( config : Config ) -> Result < Self > {
164+ Self :: new_with_platform ( config, Arc :: new ( RealPlatform ) ) . await
162165 }
163166
164167 pub fn config ( & self ) -> & Config {
You can’t perform that action at this time.
0 commit comments