diff options
| author | Your Name <you@example.com> | 2026-05-23 05:32:22 +0530 |
|---|---|---|
| committer | Your Name <you@example.com> | 2026-05-23 05:32:22 +0530 |
| commit | 5140a30be35aaf3574efce9193549f18524ce46e (patch) | |
| tree | c1146fc161fe787ccabd04558219b7591e207b61 /tests/unit/test_stratum_proxy.c | |
| parent | fb8558cbf964fae5a840f8f948b89a0d42045802 (diff) | |
Phase 7: eliminate shims - consumer files use component headers directly
- Deleted standalone shims: session.c/h, cashu.c/h, mining_payment.c/h, firewall.c/h
- Updated captive_portal.c, tollgate_api.c, tollgate_main.c, mcp_handler.c,
cvm_server.c, sw_miner.c, stratum_client.c to include component headers
- Moved tollgate_ip4_canforward_filter() lwIP hook into tollgate_main.c
- Fixed all unit tests to use component API (test_cashu, test_session,
test_mining_payment, test_stratum_proxy, test_session_payment_method,
test_firewall_sandbox, test_mcp_handler)
- Removed deleted source files from Makefile targets
- All 21 unit tests pass, ESP-IDF build passes
Diffstat (limited to 'tests/unit/test_stratum_proxy.c')
| -rw-r--r-- | tests/unit/test_stratum_proxy.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/unit/test_stratum_proxy.c b/tests/unit/test_stratum_proxy.c index 7788911..6ad9d9e 100644 --- a/tests/unit/test_stratum_proxy.c +++ b/tests/unit/test_stratum_proxy.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | #include "test_framework.h" | 1 | #include "test_framework.h" |
| 2 | #include "../../main/stratum_proxy.h" | 2 | #include "../../main/stratum_proxy.h" |
| 3 | #include "../../main/mining_payment.h" | 3 | #include "tollgate_core_mining.h" |
| 4 | #include <stdio.h> | 4 | #include <stdio.h> |
| 5 | #include <string.h> | 5 | #include <string.h> |
| 6 | 6 | ||
| @@ -8,7 +8,7 @@ int main(void) | |||
| 8 | { | 8 | { |
| 9 | printf("=== test_stratum_proxy ===\n"); | 9 | printf("=== test_stratum_proxy ===\n"); |
| 10 | 10 | ||
| 11 | mining_payment_init(); | 11 | tollgate_core_mining_init(); |
| 12 | 12 | ||
| 13 | printf("\n--- stratum_proxy_set_job / get_current_job ---\n"); | 13 | printf("\n--- stratum_proxy_set_job / get_current_job ---\n"); |
| 14 | { | 14 | { |
| @@ -42,7 +42,7 @@ int main(void) | |||
| 42 | 42 | ||
| 43 | printf("\n--- stratum_proxy_get_stats ---\n"); | 43 | printf("\n--- stratum_proxy_get_stats ---\n"); |
| 44 | { | 44 | { |
| 45 | mining_set_current_nbits(0x170309E2); | 45 | tollgate_core_mining_set_current_nbits(0x170309E2); |
| 46 | stratum_proxy_set_job(&(stratum_job_t){ | 46 | stratum_proxy_set_job(&(stratum_job_t){ |
| 47 | .job_id = 1, | 47 | .job_id = 1, |
| 48 | .nbits = 0x170309E2, | 48 | .nbits = 0x170309E2, |