upleb.uk

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

summaryrefslogtreecommitdiff
path: root/tests/unit/test_tollgate_client_mining.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit/test_tollgate_client_mining.c')
-rw-r--r--tests/unit/test_tollgate_client_mining.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/unit/test_tollgate_client_mining.c b/tests/unit/test_tollgate_client_mining.c
index e270864..efe543e 100644
--- a/tests/unit/test_tollgate_client_mining.c
+++ b/tests/unit/test_tollgate_client_mining.c
@@ -14,6 +14,14 @@ const tollgate_config_t *tollgate_config_get(void) {
14uint64_t nucula_wallet_balance(void) { return 100; } 14uint64_t nucula_wallet_balance(void) { return 100; }
15esp_err_t nucula_wallet_send(uint64_t a, char *b, size_t c) { (void)a; (void)b; (void)c; return ESP_OK; } 15esp_err_t nucula_wallet_send(uint64_t a, char *b, size_t c) { (void)a; (void)b; (void)c; return ESP_OK; }
16 16
17#define TOLLGATE_IE_GEOHASH_MAX 9
18#define MARKET_MAX_ENTRIES 10
19typedef struct { uint8_t bssid[6]; char ssid[33]; int8_t rssi; uint16_t price_per_step; uint32_t step_size; uint8_t metric; uint8_t mint_hash[4]; uint8_t npub_hash[4]; char geohash[10]; int64_t discovered_ms; bool valid; } market_entry_t;
20typedef struct { market_entry_t entries[MARKET_MAX_ENTRIES]; int count; int64_t last_scan_ms; bool scanning; int consecutive_failures; } market_t;
21static inline const market_t *market_get(void) { static market_t m = {0}; return &m; }
22static inline int market_find_cheapest(void) { return -1; }
23#define MARKET_H
24
17#include "freertos/FreeRTOS.h" 25#include "freertos/FreeRTOS.h"
18 26
19#include "../../main/tollgate_client.c" 27#include "../../main/tollgate_client.c"