From 2c8cfc74b5e39fe2d0f9a84f7e71a9c519b83aca Mon Sep 17 00:00:00 2001 From: nicolas Date: Fri, 29 May 2026 10:31:49 -0300 Subject: [PATCH] cleanup: remove dead config fields (executor_socket_path, cooldown_seconds, stats_interval_seconds), add concurrent_slots to example --- config.yaml.example | 2 +- src/config.c | 6 ------ src/config.h | 3 --- src/main.c | 4 ++-- 4 files changed, 3 insertions(+), 12 deletions(-) diff --git a/config.yaml.example b/config.yaml.example index 4dda3b2..10bfe31 100644 --- a/config.yaml.example +++ b/config.yaml.example @@ -10,8 +10,8 @@ fused_engine: reconnect_base_delay: 1.0 reconnect_max_delay: 60.0 heartbeat_interval: 18.0 - cooldown_seconds: 0.0 kcs_discount_active: false + concurrent_slots: 1 balance_wait_enabled: false initial_capital: USDT: 5 diff --git a/src/config.c b/src/config.c index df4f43b..45dbb37 100644 --- a/src/config.c +++ b/src/config.c @@ -76,10 +76,6 @@ static void handle_value(parse_state_t *st, const char *val) { st->cfg->signal_threshold_bps = atof(val); } else if (strcmp(key, "kcs_discount_active") == 0) { st->cfg->kcs_discount_active = (strcmp(val, "true") == 0 || strcmp(val, "yes") == 0); - } else if (strcmp(key, "cooldown_seconds") == 0) { - st->cfg->cooldown_seconds = atof(val); - } else if (strcmp(key, "stats_interval_seconds") == 0) { - st->cfg->stats_interval_seconds = atof(val); } else if (strcmp(key, "concurrent_slots") == 0) { st->cfg->concurrent_slots = atoi(val); } else if (strcmp(key, "balance_wait_enabled") == 0) { @@ -125,8 +121,6 @@ int config_load(const char *path, config_t *cfg) { copy_string("USDT", cfg->hold_currencies[0], CURRENCY_NAME_LEN); cfg->hold_currency_count = 1; cfg->kcs_discount_active = false; - cfg->cooldown_seconds = 0.0; - cfg->stats_interval_seconds = 60.0; cfg->concurrent_slots = 1; cfg->live_mode = false; cfg->balance_wait_enabled = false; diff --git a/src/config.h b/src/config.h index 46cb714..f1fb4c1 100644 --- a/src/config.h +++ b/src/config.h @@ -34,9 +34,6 @@ typedef struct { char excluded_currencies[MAX_EXCLUDED_CURRENCIES][CURRENCY_NAME_LEN]; /* currencies to skip */ uint32_t excluded_currency_count; /* number of excluded currencies */ bool kcs_discount_active; /* whether KCS fee discount applies */ - char executor_socket_path[256]; /* unix socket path for signal executor */ - double cooldown_seconds; /* min seconds between signals for same triangle */ - double stats_interval_seconds; /* period between stats log dumps */ int concurrent_slots; /* number of executor threads (1 = single-threaded) */ bool live_mode; /* live trading vs paper/simulation */ bool balance_wait_enabled; /* wait for WS balance settlement between legs */ diff --git a/src/main.c b/src/main.c index acf5231..e15572b 100644 --- a/src/main.c +++ b/src/main.c @@ -67,8 +67,8 @@ int main(int argc, char *argv[]) { log_write("[MAIN] Failed to load config\n"); return 1; } - log_write("[MAIN] Config: threshold=%.1f bps, cooldown=%.0fs, hold=%u currencies\n", - cfg.signal_threshold_bps, cfg.cooldown_seconds, cfg.hold_currency_count); + log_write("[MAIN] Config: threshold=%.1f bps, hold=%u currencies\n", + cfg.signal_threshold_bps, cfg.hold_currency_count); // Discover symbols from KuCoin: fetch pairs, enumerate triangles, populate table log_write("[MAIN] >>> Initializing symbol table\n");