diff options
| author | Your Name <you@example.com> | 2026-05-19 16:16:54 +0530 |
|---|---|---|
| committer | Your Name <you@example.com> | 2026-05-19 16:16:54 +0530 |
| commit | 62bce81d26994bd242035905c94d611cf956bd37 (patch) | |
| tree | d3818ea8d36cc3d39406b48fa37eae70553faf74 /main/config.c | |
| parent | 4af9a0042f2dbe053cacec8427f7f370bd0e0f22 (diff) | |
- Create components/negentropy_lib/ wrapping negentropy submodule
- CMakeLists.txt references submodule sources via relative path
- OpenSSL SHA-256 compat using mbedTLS for ESP32
- Enables C++ exceptions + RTTI for negentropy_wrapper.cpp
- Remove esp_littlefs, esp_timer from REQUIRES (transitive via wisp_relay)
- Keep tcp_transport (direct dep of stratum_client.c via esp_transport.h)
- Fix config.c duplicate seed_relays/sync_interval/fallback_interval blocks
- Remove leftover merge conflict marker in tollgate_api.c
- Add MINER_INTEGRATION_PLAN.md with miner integration checklist
idf.py build: PASS (1.3MB, 68% free)
make test-unit: PASS (19 suites, 344+ assertions)
Diffstat (limited to 'main/config.c')
| -rw-r--r-- | main/config.c | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/main/config.c b/main/config.c index 6644b3a..aa7da6d 100644 --- a/main/config.c +++ b/main/config.c | |||
| @@ -321,26 +321,6 @@ esp_err_t tollgate_config_init(void) | |||
| 321 | g_config.payout.mint_count = 1; | 321 | g_config.payout.mint_count = 1; |
| 322 | } | 322 | } |
| 323 | 323 | ||
| 324 | cJSON *seed_relays = cJSON_GetObjectItem(root, "nostr_seed_relays"); | ||
| 325 | if (seed_relays && cJSON_IsArray(seed_relays)) { | ||
| 326 | int srcount = cJSON_GetArraySize(seed_relays); | ||
| 327 | if (srcount > TOLLGATE_MAX_SEED_RELAYS) srcount = TOLLGATE_MAX_SEED_RELAYS; | ||
| 328 | for (int i = 0; i < srcount; i++) { | ||
| 329 | cJSON *r = cJSON_GetArrayItem(seed_relays, i); | ||
| 330 | if (r && cJSON_IsString(r)) { | ||
| 331 | strncpy(g_config.nostr_seed_relays[i], r->valuestring, | ||
| 332 | sizeof(g_config.nostr_seed_relays[i]) - 1); | ||
| 333 | g_config.nostr_seed_relay_count++; | ||
| 334 | } | ||
| 335 | } | ||
| 336 | } | ||
| 337 | |||
| 338 | cJSON *sync_interval = cJSON_GetObjectItem(root, "nostr_sync_interval_s"); | ||
| 339 | if (sync_interval) g_config.nostr_sync_interval_s = sync_interval->valueint; | ||
| 340 | |||
| 341 | cJSON *fallback_interval = cJSON_GetObjectItem(root, "nostr_fallback_sync_interval_s"); | ||
| 342 | if (fallback_interval) g_config.nostr_fallback_sync_interval_s = fallback_interval->valueint; | ||
| 343 | |||
| 344 | cJSON *mining = cJSON_GetObjectItem(root, "mining"); | 324 | cJSON *mining = cJSON_GetObjectItem(root, "mining"); |
| 345 | if (mining && cJSON_IsObject(mining)) { | 325 | if (mining && cJSON_IsObject(mining)) { |
| 346 | cJSON *m_en = cJSON_GetObjectItem(mining, "enabled"); | 326 | cJSON *m_en = cJSON_GetObjectItem(mining, "enabled"); |