diff options
| author | Your Name <you@example.com> | 2026-05-19 12:55:28 +0530 |
|---|---|---|
| committer | Your Name <you@example.com> | 2026-05-19 12:55:28 +0530 |
| commit | 473b4d1108d8dc9264c44de587121e6886b08a5d (patch) | |
| tree | 2812e2550c4520137127baca2ed7da2a90b47165 /main/cvm_server.c | |
| parent | beb73a2eeacf7dbe5e292ce6e26a95a933808267 (diff) | |
fix: build errors in cvm_server, stratum_proxy, sw_miner + nucula visibility
- cvm_server: replace esp_timer_get_time() with xTaskGetTickCount(), fix
process_relay_message() call signature (3 args -> 2)
- stratum_proxy: widen task_name buffer from 16 to 20 chars
- sw_miner: add missing #include esp_random.h
- nucula_src: save_proofs() moved to public in wallet.hpp
- CMakeLists: ensure tcp_transport in REQUIRES
- tollgate_main: add display.h, local_relay.h, relay_selector.h, sync_manager.h includes
- Build now succeeds: 1.2MB binary, 70% partition free
Diffstat (limited to 'main/cvm_server.c')
| -rw-r--r-- | main/cvm_server.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/main/cvm_server.c b/main/cvm_server.c index 644738b..9e22d53 100644 --- a/main/cvm_server.c +++ b/main/cvm_server.c | |||
| @@ -556,7 +556,7 @@ static void cvm_relay_task(void *arg) | |||
| 556 | return; | 556 | return; |
| 557 | } | 557 | } |
| 558 | 558 | ||
| 559 | int64_t last_ping_time = (int64_t)esp_timer_get_time() / 1000000; | 559 | int64_t last_ping_time = (int64_t)(xTaskGetTickCount() * portTICK_PERIOD_MS) / 1000; |
| 560 | int consecutive_timeouts = 0; | 560 | int consecutive_timeouts = 0; |
| 561 | 561 | ||
| 562 | while (g_running) { | 562 | while (g_running) { |
| @@ -576,7 +576,7 @@ static void cvm_relay_task(void *arg) | |||
| 576 | char *text = parse_ws_text_frame(buf, rlen); | 576 | char *text = parse_ws_text_frame(buf, rlen); |
| 577 | if (text) { | 577 | if (text) { |
| 578 | if (strlen(text) > 0) { | 578 | if (strlen(text) > 0) { |
| 579 | process_relay_message(tls, relay_url, text); | 579 | process_relay_message(relay_url, text); |
| 580 | } | 580 | } |
| 581 | free(text); | 581 | free(text); |
| 582 | } | 582 | } |
| @@ -590,7 +590,7 @@ static void cvm_relay_task(void *arg) | |||
| 590 | } | 590 | } |
| 591 | } | 591 | } |
| 592 | 592 | ||
| 593 | int64_t now = (int64_t)esp_timer_get_time() / 1000000; | 593 | int64_t now = (int64_t)(xTaskGetTickCount() * portTICK_PERIOD_MS) / 1000; |
| 594 | if (now - last_ping_time >= CVM_WS_PING_INTERVAL_S) { | 594 | if (now - last_ping_time >= CVM_WS_PING_INTERVAL_S) { |
| 595 | uint8_t ping[2] = {0x89, 0x00}; | 595 | uint8_t ping[2] = {0x89, 0x00}; |
| 596 | esp_tls_conn_write(tls, ping, 2); | 596 | esp_tls_conn_write(tls, ping, 2); |