diff options
Diffstat (limited to 'main/tollgate_main.c')
| -rw-r--r-- | main/tollgate_main.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/main/tollgate_main.c b/main/tollgate_main.c index 60503eb..2d4fa22 100644 --- a/main/tollgate_main.c +++ b/main/tollgate_main.c | |||
| @@ -237,6 +237,12 @@ static void start_services(void) | |||
| 237 | session_manager_init(); | 237 | session_manager_init(); |
| 238 | 238 | ||
| 239 | const tollgate_config_t *cfg = tollgate_config_get(); | 239 | const tollgate_config_t *cfg = tollgate_config_get(); |
| 240 | |||
| 241 | if (cfg->cvm_enabled) { | ||
| 242 | cvm_server_init(); | ||
| 243 | cvm_server_start(); | ||
| 244 | } | ||
| 245 | |||
| 240 | mint_health_init(cfg->accepted_mints, cfg->accepted_mint_count); | 246 | mint_health_init(cfg->accepted_mints, cfg->accepted_mint_count); |
| 241 | mint_health_start(); | 247 | mint_health_start(); |
| 242 | 248 | ||
| @@ -268,19 +274,13 @@ static void start_services(void) | |||
| 268 | 274 | ||
| 269 | xTaskCreate(publish_wifistr_task, "wifistr_init", 16384, NULL, 3, NULL); | 275 | xTaskCreate(publish_wifistr_task, "wifistr_init", 16384, NULL, 3, NULL); |
| 270 | 276 | ||
| 271 | const tollgate_config_t *cfg2 = tollgate_config_get(); | 277 | if (cfg->mining_enabled) { |
| 272 | if (cfg2->cvm_enabled) { | ||
| 273 | cvm_server_init(); | ||
| 274 | cvm_server_start(); | ||
| 275 | } | ||
| 276 | |||
| 277 | if (cfg2->mining_enabled) { | ||
| 278 | ESP_LOGI(TAG, "Mining subsystem enabled, initializing..."); | 278 | ESP_LOGI(TAG, "Mining subsystem enabled, initializing..."); |
| 279 | mining_payment_init(); | 279 | mining_payment_init(); |
| 280 | stratum_client_init(); | 280 | stratum_client_init(); |
| 281 | stratum_proxy_init(cfg2->mining_port); | 281 | stratum_proxy_init(cfg->mining_port); |
| 282 | 282 | ||
| 283 | if (cfg2->mining_payout_mode != MINING_PAYOUT_UPSTREAM) { | 283 | if (cfg->mining_payout_mode != MINING_PAYOUT_UPSTREAM) { |
| 284 | stratum_client_start(); | 284 | stratum_client_start(); |
| 285 | } | 285 | } |
| 286 | 286 | ||