Remove the hand-rolled ad-hoc DynArr and DynSet, replace with dlibc vector_t and set_t

This commit is contained in:
2026-09-15 14:30:29 +02:00
parent f40ffaa6f7
commit 099433b9df
16 changed files with 2355 additions and 628 deletions
+3 -3
View File
@@ -17,8 +17,8 @@ typedef struct node_discovery node_discovery_t;
#include <stddef.h>
#include <dynarr.h>
#include <dynset.h>
#include <dlibc/vector.h>
#include <dlibc/set.h>
#include <pthread.h>
@@ -32,7 +32,7 @@ typedef struct {
tcp_client_t outboundClients[MAX_CONS];
size_t outboundCount;
// Dedup cache for recently seen block hashes (canonical 32-byte hash)
DynSet* seenBlocks;
set_t* seenBlocks;
// Protects seenBlocks
pthread_mutex_t seenLock;
// Protects outboundClients snapshots and peerBlockHeight writes