diff options
| author | Your Name <you@example.com> | 2026-05-17 04:21:39 +0530 |
|---|---|---|
| committer | Your Name <you@example.com> | 2026-05-17 04:21:39 +0530 |
| commit | 78dd599277b8e8b2ddc39a4ae710ec91d737272e (patch) | |
| tree | 9fbd89695cede00b8ff3b12ce428e96a2aa70e9b /main/config.h | |
| parent | b0d7394e089f00a9ffa67a2b33a502e47b778a93 (diff) | |
Phase 4: TollGate client detection + auto-payment
- New tollgate_client.c/h: detect upstream TollGate (kind=10021),
auto-pay via nucula wallet, session monitoring with 20% renewal
- State machine: IDLE→DETECTING→NEEDS_PAY→PAYING→PAID→RENEWING
- Blocking: upstream payment before local services start
- Synchronous wallet init (was async task)
- Client config: enabled, steps_to_buy, renewal_threshold_pct
- Updated PLAN.md with Phases 4-7 (client, payout, bytes, CVM)
- Updated CHECKLIST.md with all new phase items
- 30 new unit tests (all passing), 116 total
Diffstat (limited to 'main/config.h')
| -rw-r--r-- | main/config.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/main/config.h b/main/config.h index 8254a62..4c6116e 100644 --- a/main/config.h +++ b/main/config.h | |||
| @@ -49,6 +49,11 @@ typedef struct { | |||
| 49 | int nostr_publish_interval_s; | 49 | int nostr_publish_interval_s; |
| 50 | 50 | ||
| 51 | bool identity_initialized; | 51 | bool identity_initialized; |
| 52 | |||
| 53 | bool client_enabled; | ||
| 54 | int client_steps_to_buy; | ||
| 55 | int client_renewal_threshold_pct; | ||
| 56 | int client_retry_interval_ms; | ||
| 52 | } tollgate_config_t; | 57 | } tollgate_config_t; |
| 53 | 58 | ||
| 54 | void tollgate_config_derive_unique(tollgate_config_t *cfg); | 59 | void tollgate_config_derive_unique(tollgate_config_t *cfg); |