upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
Diffstat (limited to 'main')
-rw-r--r--main/CMakeLists.txt11
-rw-r--r--main/config.c20
-rw-r--r--main/tollgate_api.c1
3 files changed, 5 insertions, 27 deletions
diff --git a/main/CMakeLists.txt b/main/CMakeLists.txt
index 0669b70..90000b7 100644
--- a/main/CMakeLists.txt
+++ b/main/CMakeLists.txt
@@ -31,9 +31,8 @@ idf_component_register(SRCS "tollgate_main.c"
31 "sw_miner.c" 31 "sw_miner.c"
32 "asic_miner.c" 32 "asic_miner.c"
33 INCLUDE_DIRS "." 33 INCLUDE_DIRS "."
34 REQUIRES esp_wifi esp_event esp_netif nvs_flash esp_http_server 34 REQUIRES esp_wifi esp_event esp_netif nvs_flash esp_http_server
35 lwip json esp_http_client mbedtls esp-tls log spiffs 35 lwip json esp_http_client mbedtls esp-tls log spiffs
36 nucula_lib secp256k1 axs15231b qrcode wisp_relay 36 nucula_lib secp256k1 axs15231b qrcode wisp_relay
37 esp_littlefs negentropy 37 negentropy_lib tcp_transport
38 esp_timer tcp_transport 38 PRIV_REQUIRES esp-tls)
39 PRIV_REQUIRES esp-tls)
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");
diff --git a/main/tollgate_api.c b/main/tollgate_api.c
index b775f55..45cd02f 100644
--- a/main/tollgate_api.c
+++ b/main/tollgate_api.c
@@ -678,7 +678,6 @@ static esp_err_t api_get_mining_stats(httpd_req_t *req)
678 httpd_resp_send(req, json, strlen(json)); 678 httpd_resp_send(req, json, strlen(json));
679 cJSON_free(json); 679 cJSON_free(json);
680 cJSON_Delete(root); 680 cJSON_Delete(root);
681>>>>>>> feature/mining-payment
682 return ESP_OK; 681 return ESP_OK;
683} 682}
684 683