diff options
| author | Your Name <you@example.com> | 2026-05-17 04:50:07 +0530 |
|---|---|---|
| committer | Your Name <you@example.com> | 2026-05-17 04:50:07 +0530 |
| commit | edd125d0e3fe5fe7c0edf30c429723f3b0120c68 (patch) | |
| tree | 5b1134ad7a6cfce7adeb46f5069e33b509ce9751 /main/config.h | |
| parent | cb4bd7d7c10cadcb43f82c09b13ffed744e541f7 (diff) | |
feat(phase6): bytes-based billing - dual metric support
- session_create_bytes() + session_add_bytes() for bytes-metric sessions
- session_is_expired() dispatches on config metric (bytes vs milliseconds)
- cashu_calculate_allotment() unified dispatcher for both metrics
- tollgate_api discovery/usage/session_event use configured metric
- config: metric field defaults to 'bytes', step_size_bytes=22020096 (21MB)
- 14 new unit tests (148 total passing)
- ASSERT_EQ_UINT64 macro added to test framework
Diffstat (limited to 'main/config.h')
| -rw-r--r-- | main/config.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/main/config.h b/main/config.h index de9f856..86b5e1a 100644 --- a/main/config.h +++ b/main/config.h | |||
| @@ -43,6 +43,8 @@ typedef struct { | |||
| 43 | char lnurl_url[256]; | 43 | char lnurl_url[256]; |
| 44 | int price_per_step; | 44 | int price_per_step; |
| 45 | int step_size_ms; | 45 | int step_size_ms; |
| 46 | int step_size_bytes; | ||
| 47 | char metric[16]; | ||
| 46 | uint64_t persist_threshold_sats; | 48 | uint64_t persist_threshold_sats; |
| 47 | 49 | ||
| 48 | char nostr_geohash[16]; | 50 | char nostr_geohash[16]; |