|  | 
| 2 | 2 | Module to run daemon process. | 
| 3 | 3 | *) | 
| 4 | 4 | open Core | 
|  | 5 | + | 
| 5 | 6 | open Integration_test_lib | 
| 6 | 7 | open Async | 
| 7 | 8 | 
 | 
| @@ -112,7 +113,6 @@ module Client = struct | 
| 112 | 113 | end | 
| 113 | 114 | 
 | 
| 114 | 115 | module Config = struct | 
| 115 |  | - | 
| 116 | 116 |   module ConfigDirs = struct | 
| 117 | 117 |     type t = | 
| 118 | 118 |       { root_path : string | 
| @@ -143,21 +143,31 @@ module Config = struct | 
| 143 | 143 |     let mina_log t = t.conf ^/ "mina.log" | 
| 144 | 144 |   end | 
| 145 | 145 | 
 | 
| 146 |  | -  type t = { port : int; dirs : ConfigDirs.t; config: Test_config.t ; runtime_config : Runtime_config.t; genesis_ledger : Genesis_ledger.t } | 
|  | 146 | +  type t = | 
|  | 147 | +    { port : int | 
|  | 148 | +    ; dirs : ConfigDirs.t | 
|  | 149 | +    ; config : Test_config.t | 
|  | 150 | +    ; runtime_config : Runtime_config.t | 
|  | 151 | +    ; genesis_ledger : Genesis_ledger.t | 
|  | 152 | +    } | 
| 147 | 153 | 
 | 
| 148 |  | -  let create ?(port = 8031) ~(dirs:ConfigDirs.t) ~(config:Test_config.t) () = | 
|  | 154 | +  let create ?(port = 8031) ~(dirs : ConfigDirs.t) ~(config : Test_config.t) () | 
|  | 155 | +      = | 
| 149 | 156 |     let genesis_ledger = Genesis_ledger.create config.genesis_ledger in | 
| 150 | 157 |     let runtime_config = | 
| 151 | 158 |       Runtime_config_builder.create ~test_config:config ~genesis_ledger | 
| 152 | 159 |     in | 
| 153 | 160 | 
 | 
| 154 |  | -    Yojson.Safe.to_file (dirs.conf ^/ "daemon.json") | 
|  | 161 | +    Yojson.Safe.to_file | 
|  | 162 | +      (dirs.conf ^/ "daemon.json") | 
| 155 | 163 |       (Runtime_config.to_yojson runtime_config) ; | 
| 156 | 164 | 
 | 
| 157 | 165 |     { port; dirs; config; runtime_config; genesis_ledger } | 
| 158 | 166 | 
 | 
| 159 | 167 |   let default () = | 
| 160 |  | -    create ~dirs:ConfigDirs.default ~config:(Test_config.default ~constants:Test_config.default_constants) () | 
|  | 168 | +    create ~dirs:ConfigDirs.default | 
|  | 169 | +      ~config:(Test_config.default ~constants:Test_config.default_constants) | 
|  | 170 | +      () | 
| 161 | 171 | 
 | 
| 162 | 172 |   let libp2p_keypair_folder t = ConfigDirs.libp2p_keypair_folder t.dirs | 
| 163 | 173 | 
 | 
| @@ -203,10 +213,11 @@ let archive_blocks_from_files t ~archive_address ~format ?(sleep = 5) blocks = | 
| 203 | 213 |       let%bind _ = archive_blocks t ~archive_address ~format [ block ] () in | 
| 204 | 214 |       after (Time.Span.of_sec (Float.of_int sleep)) ) | 
| 205 | 215 | 
 | 
| 206 |  | -let of_test_config test_config = { | 
| 207 |  | -  config = Config.create ~dirs:Config.ConfigDirs.default ~config:test_config () | 
|  | 216 | +let of_test_config test_config = | 
|  | 217 | +  { config = | 
|  | 218 | +      Config.create ~dirs:Config.ConfigDirs.default ~config:test_config () | 
| 208 | 219 |   ; executor = Executor.AutoDetect | 
| 209 |  | -} | 
|  | 220 | +  } | 
| 210 | 221 | 
 | 
| 211 | 222 | let of_config config = { config; executor = Executor.AutoDetect } | 
| 212 | 223 | 
 | 
|  | 
0 commit comments