Start the api service in a background tasks. Wait until the service is responsive.
(&self, config: configs::orderbook::Configuration)
| 217 | /// Start the api service in a background tasks. |
| 218 | /// Wait until the service is responsive. |
| 219 | pub async fn start_api(&self, config: configs::orderbook::Configuration) { |
| 220 | let config = configs::orderbook::Configuration { |
| 221 | shared: configs::shared::SharedConfig { |
| 222 | volume_fee_bucket_overrides: config.shared.volume_fee_bucket_overrides.clone(), |
| 223 | enable_sell_equals_buy_volume_fee: config.shared.enable_sell_equals_buy_volume_fee, |
| 224 | ..self.shared_config() |
| 225 | }, |
| 226 | ..config |
| 227 | }; |
| 228 | |
| 229 | tokio::task::spawn(orderbook::run(config)); |
| 230 | |
| 231 | Self::wait_for_api_to_come_up().await; |
| 232 | } |
| 233 | |
| 234 | /// Starts a basic version of the protocol with a single baseline solver. |
| 235 | pub async fn start_protocol(&self, solver: TestAccount) { |