Classify chat supernodes independently of address type
This commit is contained in:
1 parent
01bc6e4cf0
commit
1c499dc230
2 files changed
+70
-4
No files matched your search
@@ -107,6 +107,18 @@ void topo_node_sqlite_update_rtt(sqlite3* db, uint64_t node_id, uint16_t rtt);
|
||||
struct TOPO_NODE* topo_node_sqlite_node_load(sqlite3* db, struct TOPO_GROUPS* groups, uint64_t node_id);
|
||||
|
||||
int topo_node_sqlite_set_connected(sqlite3* db, const char* channel_id, uint64_t node_id, int connected);
|
||||
|
||||
/* Кандидат CHAT-подключения: роль канальная, тип устройства из подписанного snapshot.
|
||||
* UINT8_MAX означает отсутствие сведений о типе; адреса не ограничивают выборку. */
|
||||
struct topo_connect_peer {
|
||||
uint64_t node_id;
|
||||
uint8_t client_type, supernode;
|
||||
};
|
||||
|
||||
/* Все неудалённые участники, включая self; сначала connected, затем RTT/node_id.
|
||||
* 0/-1; массив принадлежит вызывающему и освобождается u_free(). */
|
||||
int topo_node_sqlite_get_connect_peers(sqlite3* db, const char* channel_id,
|
||||
struct topo_connect_peer** out, size_t* out_count);
|
||||
int topo_node_sqlite_get_connected_peers(sqlite3* db, const char* channel_id, uint64_t** out_ids, int* out_count);
|
||||
int topo_node_sqlite_get_public_peers(sqlite3* db, const char* channel_id, uint64_t** out_ids, int* out_count, uint64_t self_node_id);
|
||||
int topo_node_sqlite_get_local_peers(sqlite3* db, const char* channel_id, uint64_t** out_ids, int* out_count, uint64_t self_node_id);
|
||||
|
||||
Reference in new issue
Block a user