diff options
| author | Your Name <you@example.com> | 2026-05-28 18:11:48 +0530 |
|---|---|---|
| committer | Your Name <you@example.com> | 2026-05-28 18:11:48 +0530 |
| commit | 4deac9fd95284ac2770259059e2ab7c8ac98570f (patch) | |
| tree | cd92aa97b39ed73caac70109430a3bbbacee3249 /components/tollgate_core | |
| parent | 96589ce5d0bc49a3f6b006b0bb443b81d1dd8e03 (diff) | |
fix: add extern C guards to mining and stratum_proxy headers
Needed for C++ consumers (NerdQAxePlus create_jobs_task, stratum_manager).
Diffstat (limited to 'components/tollgate_core')
| -rw-r--r-- | components/tollgate_core/src/tollgate_core_mining.h | 8 | ||||
| -rw-r--r-- | components/tollgate_core/src/tollgate_core_stratum_proxy.h | 8 |
2 files changed, 16 insertions, 0 deletions
diff --git a/components/tollgate_core/src/tollgate_core_mining.h b/components/tollgate_core/src/tollgate_core_mining.h index 442e33a..c2e52c1 100644 --- a/components/tollgate_core/src/tollgate_core_mining.h +++ b/components/tollgate_core/src/tollgate_core_mining.h | |||
| @@ -5,6 +5,10 @@ | |||
| 5 | #include <stdint.h> | 5 | #include <stdint.h> |
| 6 | #include <stdbool.h> | 6 | #include <stdbool.h> |
| 7 | 7 | ||
| 8 | #ifdef __cplusplus | ||
| 9 | extern "C" { | ||
| 10 | #endif | ||
| 11 | |||
| 8 | #define MINING_SHARE_WINDOW_S 30 | 12 | #define MINING_SHARE_WINDOW_S 30 |
| 9 | #define MINING_BLOCK_SUBSIDY_SATS 312500000ULL | 13 | #define MINING_BLOCK_SUBSIDY_SATS 312500000ULL |
| 10 | #define MINING_BLOCKS_PER_DAY 144ULL | 14 | #define MINING_BLOCKS_PER_DAY 144ULL |
| @@ -32,4 +36,8 @@ double tollgate_core_mining_get_current_hashprice(void); | |||
| 32 | void tollgate_core_mining_set_current_nbits(uint32_t nbits); | 36 | void tollgate_core_mining_set_current_nbits(uint32_t nbits); |
| 33 | void tollgate_core_mining_init(void); | 37 | void tollgate_core_mining_init(void); |
| 34 | 38 | ||
| 39 | #ifdef __cplusplus | ||
| 40 | } | ||
| 41 | #endif | ||
| 42 | |||
| 35 | #endif | 43 | #endif |
diff --git a/components/tollgate_core/src/tollgate_core_stratum_proxy.h b/components/tollgate_core/src/tollgate_core_stratum_proxy.h index 42f2fb1..645d5eb 100644 --- a/components/tollgate_core/src/tollgate_core_stratum_proxy.h +++ b/components/tollgate_core/src/tollgate_core_stratum_proxy.h | |||
| @@ -5,6 +5,10 @@ | |||
| 5 | #include <stdint.h> | 5 | #include <stdint.h> |
| 6 | #include <stdbool.h> | 6 | #include <stdbool.h> |
| 7 | 7 | ||
| 8 | #ifdef __cplusplus | ||
| 9 | extern "C" { | ||
| 10 | #endif | ||
| 11 | |||
| 8 | #define TOLLGATE_STRATUM_MAX_JOB_ID_LEN 32 | 12 | #define TOLLGATE_STRATUM_MAX_JOB_ID_LEN 32 |
| 9 | #define TOLLGATE_STRATUM_MAX_JOBS 4 | 13 | #define TOLLGATE_STRATUM_MAX_JOBS 4 |
| 10 | 14 | ||
| @@ -36,4 +40,8 @@ const tollgate_stratum_job_t *tollgate_core_stratum_proxy_get_current_job(void); | |||
| 36 | void tollgate_core_stratum_proxy_get_stats(tollgate_stratum_proxy_stats_t *stats); | 40 | void tollgate_core_stratum_proxy_get_stats(tollgate_stratum_proxy_stats_t *stats); |
| 37 | void tollgate_core_stratum_proxy_stop(void); | 41 | void tollgate_core_stratum_proxy_stop(void); |
| 38 | 42 | ||
| 43 | #ifdef __cplusplus | ||
| 44 | } | ||
| 45 | #endif | ||
| 46 | |||
| 39 | #endif | 47 | #endif |