Skip to content

Commit cd9ff77

Browse files
committed
refactor: Explicitly pass dependencies to constructors.
Instead of transitively loading them from dependencies, we should be explicit about what each object needs. The downside of this is that it's not clear whether the object and its dependency use the same common dependency. The upside is that we don't expose those getters of internal dependencies.
1 parent f84e8cd commit cd9ff77

25 files changed

+110
-121
lines changed

auto_tests/announce_test.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,9 @@ static void test_store_data(void)
6464
ck_assert(net != nullptr);
6565
DHT *dht = new_dht(log, mem, rng, ns, mono_time, net, true, true);
6666
ck_assert(dht != nullptr);
67-
Forwarding *forwarding = new_forwarding(log, mem, rng, mono_time, dht);
67+
Forwarding *forwarding = new_forwarding(log, mem, rng, mono_time, dht, net);
6868
ck_assert(forwarding != nullptr);
69-
Announcements *announce = new_announcements(log, mem, rng, mono_time, forwarding);
69+
Announcements *announce = new_announcements(log, mem, rng, mono_time, forwarding, dht, net);
7070
ck_assert(announce != nullptr);
7171

7272
/* Just to prevent CI from complaining that set_synch_offset is unused: */

auto_tests/forwarding_test.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,12 +132,12 @@ static Forwarding_Subtox *new_forwarding_subtox(const Memory *mem, bool no_udp,
132132
ck_assert(subtox->tcp_np != nullptr);
133133

134134
const TCP_Proxy_Info inf = {{{{0}}}};
135-
subtox->c = new_net_crypto(subtox->log, mem, rng, ns, subtox->mono_time, subtox->dht, &inf, subtox->tcp_np);
135+
subtox->c = new_net_crypto(subtox->log, mem, rng, ns, subtox->mono_time, subtox->net, subtox->dht, &inf, subtox->tcp_np);
136136

137-
subtox->forwarding = new_forwarding(subtox->log, mem, rng, subtox->mono_time, subtox->dht);
137+
subtox->forwarding = new_forwarding(subtox->log, mem, rng, subtox->mono_time, subtox->dht, subtox->net);
138138
ck_assert(subtox->forwarding != nullptr);
139139

140-
subtox->announce = new_announcements(subtox->log, mem, rng, subtox->mono_time, subtox->forwarding);
140+
subtox->announce = new_announcements(subtox->log, mem, rng, subtox->mono_time, subtox->forwarding, subtox->dht, subtox->net);
141141
ck_assert(subtox->announce != nullptr);
142142

143143
return subtox;

auto_tests/onion_test.c

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
#include "../testing/misc_tools.h"
55
#include "../toxcore/mono_time.h"
6+
#include "../toxcore/network.h"
67
#include "../toxcore/onion.h"
78
#include "../toxcore/onion_announce.h"
89
#include "../toxcore/onion_client.h"
@@ -238,8 +239,10 @@ static void test_basic(void)
238239
Mono_Time *mono_time2 = mono_time_new(mem, nullptr, nullptr);
239240

240241
IP ip = get_loopback();
241-
Onion *onion1 = new_onion(log1, mem, mono_time1, rng, new_dht(log1, mem, rng, ns, mono_time1, new_networking(log1, mem, ns, &ip, 36567), true, false));
242-
Onion *onion2 = new_onion(log2, mem, mono_time2, rng, new_dht(log2, mem, rng, ns, mono_time2, new_networking(log2, mem, ns, &ip, 36568), true, false));
242+
Networking_Core *net1 = new_networking(log1, mem, ns, &ip, 36567);
243+
Onion *onion1 = new_onion(log1, mem, mono_time1, rng, new_dht(log1, mem, rng, ns, mono_time1, net1, true, false), net1);
244+
Networking_Core *net2 = new_networking(log2, mem, ns, &ip, 36568);
245+
Onion *onion2 = new_onion(log2, mem, mono_time2, rng, new_dht(log2, mem, rng, ns, mono_time2, net2, true, false), net2);
243246
ck_assert_msg((onion1 != nullptr) && (onion2 != nullptr), "Onion failed initializing.");
244247
networking_registerhandler(onion2->net, NET_PACKET_ANNOUNCE_REQUEST, &handle_test_1, onion2);
245248

@@ -282,8 +285,8 @@ static void test_basic(void)
282285
do_onion(mono_time2, onion2);
283286
} while (handled_test_2 == 0);
284287

285-
Onion_Announce *onion1_a = new_onion_announce(log1, mem, rng, mono_time1, onion1->dht);
286-
Onion_Announce *onion2_a = new_onion_announce(log2, mem, rng, mono_time2, onion2->dht);
288+
Onion_Announce *onion1_a = new_onion_announce(log1, mem, rng, mono_time1, onion1->dht, onion1->net);
289+
Onion_Announce *onion2_a = new_onion_announce(log2, mem, rng, mono_time2, onion2->dht, onion2->net);
287290
networking_registerhandler(onion1->net, NET_PACKET_ANNOUNCE_RESPONSE, &handle_test_3, onion1);
288291
networking_registerhandler(onion1->net, NET_PACKET_ANNOUNCE_RESPONSE_OLD, &handle_test_3_old, onion1);
289292
ck_assert_msg((onion1_a != nullptr) && (onion2_a != nullptr), "Onion_Announce failed initializing.");
@@ -335,7 +338,8 @@ static void test_basic(void)
335338

336339
Mono_Time *mono_time3 = mono_time_new(mem, nullptr, nullptr);
337340

338-
Onion *onion3 = new_onion(log3, mem, mono_time3, rng, new_dht(log3, mem, rng, ns, mono_time3, new_networking(log3, mem, ns, &ip, 36569), true, false));
341+
Networking_Core *net3 = new_networking(log3, mem, ns, &ip, 36569);
342+
Onion *onion3 = new_onion(log3, mem, mono_time3, rng, new_dht(log3, mem, rng, ns, mono_time3, net3, true, false), net3);
339343
ck_assert_msg((onion3 != nullptr), "Onion failed initializing.");
340344

341345
random_nonce(rng, nonce);
@@ -360,7 +364,7 @@ static void test_basic(void)
360364
{
361365
Onion *onion = onion3;
362366

363-
Networking_Core *net = dht_get_net(onion->dht);
367+
Networking_Core *net = onion->net;
364368
DHT *dht = onion->dht;
365369
kill_onion(onion);
366370
kill_dht(dht);
@@ -372,7 +376,7 @@ static void test_basic(void)
372376
{
373377
Onion *onion = onion2;
374378

375-
Networking_Core *net = dht_get_net(onion->dht);
379+
Networking_Core *net = onion->net;
376380
DHT *dht = onion->dht;
377381
kill_onion(onion);
378382
kill_dht(dht);
@@ -384,7 +388,7 @@ static void test_basic(void)
384388
{
385389
Onion *onion = onion1;
386390

387-
Networking_Core *net = dht_get_net(onion->dht);
391+
Networking_Core *net = onion->net;
388392
DHT *dht = onion->dht;
389393
kill_onion(onion);
390394
kill_dht(dht);
@@ -397,6 +401,7 @@ static void test_basic(void)
397401
typedef struct {
398402
Logger *log;
399403
Mono_Time *mono_time;
404+
Net_Crypto *nc;
400405
Net_Profile *tcp_np;
401406
Onion *onion;
402407
Onion_Announce *onion_a;
@@ -450,7 +455,7 @@ static Onions *new_onions(const Memory *mem, const Random *rng, uint16_t port, u
450455
return nullptr;
451456
}
452457

453-
on->onion = new_onion(on->log, mem, on->mono_time, rng, dht);
458+
on->onion = new_onion(on->log, mem, on->mono_time, rng, dht, net);
454459

455460
if (!on->onion) {
456461
kill_dht(dht);
@@ -461,7 +466,7 @@ static Onions *new_onions(const Memory *mem, const Random *rng, uint16_t port, u
461466
return nullptr;
462467
}
463468

464-
on->onion_a = new_onion_announce(on->log, mem, rng, on->mono_time, dht);
469+
on->onion_a = new_onion_announce(on->log, mem, rng, on->mono_time, dht, net);
465470

466471
if (!on->onion_a) {
467472
kill_onion(on->onion);
@@ -487,7 +492,8 @@ static Onions *new_onions(const Memory *mem, const Random *rng, uint16_t port, u
487492
}
488493

489494
TCP_Proxy_Info inf = {{{{0}}}};
490-
on->onion_c = new_onion_client(on->log, mem, rng, on->mono_time, new_net_crypto(on->log, mem, rng, ns, on->mono_time, dht, &inf, on->tcp_np));
495+
on->nc = new_net_crypto(on->log, mem, rng, ns, on->mono_time, net, dht, &inf, on->tcp_np);
496+
on->onion_c = new_onion_client(on->log, mem, rng, on->mono_time, on->nc, dht, net);
491497

492498
if (!on->onion_c) {
493499
netprof_kill(mem, on->tcp_np);
@@ -515,9 +521,9 @@ static void do_onions(Onions *on)
515521

516522
static void kill_onions(const Memory *mem, Onions *on)
517523
{
518-
Networking_Core *net = dht_get_net(on->onion->dht);
524+
Networking_Core *net = on->onion->net;
519525
DHT *dht = on->onion->dht;
520-
Net_Crypto *c = onion_get_net_crypto(on->onion_c);
526+
Net_Crypto *c = on->nc;
521527
kill_onion_client(on->onion_c);
522528
kill_onion_announce(on->onion_a);
523529
kill_onion(on->onion);
@@ -641,9 +647,9 @@ static void test_announce(void)
641647

642648
printf("adding friend\n");
643649
int frnum_f = onion_addfriend(onions[NUM_FIRST]->onion_c,
644-
nc_get_self_public_key(onion_get_net_crypto(onions[NUM_LAST]->onion_c)));
650+
nc_get_self_public_key(onions[NUM_LAST]->nc));
645651
int frnum = onion_addfriend(onions[NUM_LAST]->onion_c,
646-
nc_get_self_public_key(onion_get_net_crypto(onions[NUM_FIRST]->onion_c)));
652+
nc_get_self_public_key(onions[NUM_FIRST]->nc));
647653

648654
onion_dht_pk_callback(onions[NUM_FIRST]->onion_c, frnum_f, &dht_pk_callback, onions[NUM_FIRST], NUM_FIRST);
649655
onion_dht_pk_callback(onions[NUM_LAST]->onion_c, frnum, &dht_pk_callback, onions[NUM_LAST], NUM_LAST);

other/DHT_bootstrap.c

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -159,14 +159,15 @@ int main(int argc, char *argv[])
159159
Mono_Time *mono_time = mono_time_new(mem, nullptr, nullptr);
160160
const uint16_t start_port = PORT;
161161
const uint16_t end_port = start_port + (TOX_PORTRANGE_TO - TOX_PORTRANGE_FROM);
162-
DHT *dht = new_dht(logger, mem, rng, ns, mono_time, new_networking_ex(logger, mem, ns, &ip, start_port, end_port, nullptr), true, true);
163-
Onion *onion = new_onion(logger, mem, mono_time, rng, dht);
164-
Forwarding *forwarding = new_forwarding(logger, mem, rng, mono_time, dht);
162+
Networking_Core *net = new_networking_ex(logger, mem, ns, &ip, start_port, end_port, nullptr);
163+
DHT *dht = new_dht(logger, mem, rng, ns, mono_time, net, true, true);
164+
Onion *onion = new_onion(logger, mem, mono_time, rng, dht, net);
165+
Forwarding *forwarding = new_forwarding(logger, mem, rng, mono_time, dht, net);
165166
GC_Announces_List *gc_announces_list = new_gca_list(mem);
166-
Onion_Announce *onion_a = new_onion_announce(logger, mem, rng, mono_time, dht);
167+
Onion_Announce *onion_a = new_onion_announce(logger, mem, rng, mono_time, dht, net);
167168

168169
#ifdef DHT_NODE_EXTRA_PACKETS
169-
bootstrap_set_callbacks(dht_get_net(dht), (uint32_t)DAEMON_VERSION_NUMBER, (const uint8_t *) motd_str, strlen(motd_str) + 1);
170+
bootstrap_set_callbacks(net, (uint32_t)DAEMON_VERSION_NUMBER, (const uint8_t *) motd_str, strlen(motd_str) + 1);
170171
#endif
171172

172173
if (onion == nullptr || forwarding == nullptr || onion_a == nullptr) {
@@ -216,7 +217,7 @@ int main(int argc, char *argv[])
216217
fclose(file);
217218

218219
printf("\n");
219-
printf("Port: %u\n", net_ntohs(net_port(dht_get_net(dht))));
220+
printf("Port: %u\n", net_ntohs(net_port(net)));
220221

221222
if (argc > argvoffset + 3) {
222223
printf("Trying to bootstrap into the network...\n");
@@ -260,7 +261,7 @@ int main(int argc, char *argv[])
260261
do_dht(dht);
261262

262263
if (mono_time_is_timeout(mono_time, last_lan_discovery, is_waiting_for_dht_connection ? 5 : LAN_DISCOVERY_INTERVAL)) {
263-
lan_discovery_send(dht_get_net(dht), broadcast, dht_get_self_public_key(dht), net_htons(PORT));
264+
lan_discovery_send(net, broadcast, dht_get_self_public_key(dht), net_htons(PORT));
264265
last_lan_discovery = mono_time_get(mono_time);
265266
}
266267

@@ -269,7 +270,7 @@ int main(int argc, char *argv[])
269270
#ifdef TCP_RELAY_ENABLED
270271
do_tcp_server(tcp_s, mono_time);
271272
#endif
272-
networking_poll(dht_get_net(dht), nullptr);
273+
networking_poll(net, nullptr);
273274

274275
c_sleep(1);
275276
}

other/bootstrap_daemon/src/tox-bootstrapd.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ int main(int argc, char *argv[])
349349
return 1;
350350
}
351351

352-
Forwarding *forwarding = new_forwarding(logger, mem, rng, mono_time, dht);
352+
Forwarding *forwarding = new_forwarding(logger, mem, rng, mono_time, dht, net);
353353

354354
if (forwarding == nullptr) {
355355
log_write(LOG_LEVEL_ERROR, "Couldn't initialize forwarding. Exiting.\n");
@@ -363,7 +363,7 @@ int main(int argc, char *argv[])
363363
return 1;
364364
}
365365

366-
Announcements *announce = new_announcements(logger, mem, rng, mono_time, forwarding);
366+
Announcements *announce = new_announcements(logger, mem, rng, mono_time, forwarding, dht, net);
367367

368368
if (announce == nullptr) {
369369
log_write(LOG_LEVEL_ERROR, "Couldn't initialize DHT announcements. Exiting.\n");
@@ -394,7 +394,7 @@ int main(int argc, char *argv[])
394394
return 1;
395395
}
396396

397-
Onion *onion = new_onion(logger, mem, mono_time, rng, dht);
397+
Onion *onion = new_onion(logger, mem, mono_time, rng, dht, net);
398398

399399
if (onion == nullptr) {
400400
log_write(LOG_LEVEL_ERROR, "Couldn't initialize Tox Onion. Exiting.\n");
@@ -411,7 +411,7 @@ int main(int argc, char *argv[])
411411
return 1;
412412
}
413413

414-
Onion_Announce *onion_a = new_onion_announce(logger, mem, rng, mono_time, dht);
414+
Onion_Announce *onion_a = new_onion_announce(logger, mem, rng, mono_time, dht, net);
415415

416416
if (onion_a == nullptr) {
417417
log_write(LOG_LEVEL_ERROR, "Couldn't initialize Tox Onion Announce. Exiting.\n");
@@ -432,7 +432,7 @@ int main(int argc, char *argv[])
432432
gca_onion_init(group_announce, onion_a);
433433

434434
if (enable_motd) {
435-
if (bootstrap_set_callbacks(dht_get_net(dht), DAEMON_VERSION_NUMBER, (uint8_t *)motd, strlen(motd) + 1) == 0) {
435+
if (bootstrap_set_callbacks(net, DAEMON_VERSION_NUMBER, (uint8_t *)motd, strlen(motd) + 1) == 0) {
436436
log_write(LOG_LEVEL_INFO, "Set MOTD successfully.\n");
437437
free(motd);
438438
} else {
@@ -592,7 +592,7 @@ int main(int argc, char *argv[])
592592
do_dht(dht);
593593

594594
if (enable_lan_discovery && mono_time_is_timeout(mono_time, last_lan_discovery, LAN_DISCOVERY_INTERVAL)) {
595-
lan_discovery_send(dht_get_net(dht), broadcast, dht_get_self_public_key(dht), net_htons_port);
595+
lan_discovery_send(net, broadcast, dht_get_self_public_key(dht), net_htons_port);
596596
last_lan_discovery = mono_time_get(mono_time);
597597
}
598598

@@ -602,7 +602,7 @@ int main(int argc, char *argv[])
602602
do_tcp_server(tcp_server, mono_time);
603603
}
604604

605-
networking_poll(dht_get_net(dht), nullptr);
605+
networking_poll(net, nullptr);
606606

607607
if (waiting_for_dht_connection && dht_isconnected(dht)) {
608608
log_write(LOG_LEVEL_INFO, "Connected to another bootstrap node successfully.\n");

toxcore/DHT.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
#include "shared_key_cache.h"
2626
#include "sort.h"
2727
#include "state.h"
28-
#include "util.h"
2928

3029
/** The timeout after which a node is discarded completely. */
3130
#define KILL_NODE_TIMEOUT (BAD_NODE_TIMEOUT + PING_INTERVAL)
@@ -161,10 +160,6 @@ void dht_set_self_secret_key(DHT *dht, const uint8_t *key)
161160
memcpy(dht->self_secret_key, key, CRYPTO_SECRET_KEY_SIZE);
162161
}
163162

164-
Networking_Core *dht_get_net(const DHT *dht)
165-
{
166-
return dht->net;
167-
}
168163
struct Ping *dht_get_ping(const DHT *dht)
169164
{
170165
return dht->ping;
@@ -2509,7 +2504,7 @@ DHT *new_dht(const Logger *log, const Memory *mem, const Random *rng, const Netw
25092504
dht->hole_punching_enabled = hole_punching_enabled;
25102505
dht->lan_discovery_enabled = lan_discovery_enabled;
25112506

2512-
dht->ping = ping_new(mem, mono_time, rng, dht);
2507+
dht->ping = ping_new(mem, mono_time, rng, dht, net);
25132508

25142509
if (dht->ping == nullptr) {
25152510
LOGGER_ERROR(log, "failed to initialise ping");

toxcore/DHT.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,6 @@ const uint8_t *_Nonnull dht_get_self_secret_key(const DHT *_Nonnull dht);
222222
void dht_set_self_public_key(DHT *_Nonnull dht, const uint8_t *_Nonnull key);
223223
void dht_set_self_secret_key(DHT *_Nonnull dht, const uint8_t *_Nonnull key);
224224

225-
Networking_Core *_Nonnull dht_get_net(const DHT *_Nonnull dht);
226225
struct Ping *_Nonnull dht_get_ping(const DHT *_Nonnull dht);
227226
const Client_data *_Nonnull dht_get_close_clientlist(const DHT *_Nonnull dht);
228227
const Client_data *_Nonnull dht_get_close_client(const DHT *_Nonnull dht, uint32_t client_num);

toxcore/Messenger.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3443,7 +3443,7 @@ Messenger *new_messenger(Mono_Time *mono_time, const Memory *mem, const Random *
34433443
return nullptr;
34443444
}
34453445

3446-
m->net_crypto = new_net_crypto(m->log, m->mem, m->rng, m->ns, m->mono_time, m->dht, &options->proxy_info, m->tcp_np);
3446+
m->net_crypto = new_net_crypto(m->log, m->mem, m->rng, m->ns, m->mono_time, m->net, m->dht, &options->proxy_info, m->tcp_np);
34473447

34483448
if (m->net_crypto == nullptr) {
34493449
LOGGER_WARNING(m->log, "net_crypto initialisation failed");
@@ -3473,9 +3473,9 @@ Messenger *new_messenger(Mono_Time *mono_time, const Memory *mem, const Random *
34733473
}
34743474

34753475
if (options->dht_announcements_enabled) {
3476-
m->forwarding = new_forwarding(m->log, m->mem, m->rng, m->mono_time, m->dht);
3476+
m->forwarding = new_forwarding(m->log, m->mem, m->rng, m->mono_time, m->dht, m->net);
34773477
if (m->forwarding != nullptr) {
3478-
m->announce = new_announcements(m->log, m->mem, m->rng, m->mono_time, m->forwarding);
3478+
m->announce = new_announcements(m->log, m->mem, m->rng, m->mono_time, m->forwarding, m->dht, m->net);
34793479
} else {
34803480
m->announce = nullptr;
34813481
}
@@ -3484,11 +3484,11 @@ Messenger *new_messenger(Mono_Time *mono_time, const Memory *mem, const Random *
34843484
m->announce = nullptr;
34853485
}
34863486

3487-
m->onion = new_onion(m->log, m->mem, m->mono_time, m->rng, m->dht);
3488-
m->onion_a = new_onion_announce(m->log, m->mem, m->rng, m->mono_time, m->dht);
3489-
m->onion_c = new_onion_client(m->log, m->mem, m->rng, m->mono_time, m->net_crypto);
3487+
m->onion = new_onion(m->log, m->mem, m->mono_time, m->rng, m->dht, m->net);
3488+
m->onion_a = new_onion_announce(m->log, m->mem, m->rng, m->mono_time, m->dht, m->net);
3489+
m->onion_c = new_onion_client(m->log, m->mem, m->rng, m->mono_time, m->net_crypto, m->dht, m->net);
34903490
if (m->onion_c != nullptr) {
3491-
m->fr_c = new_friend_connections(m->log, m->mem, m->mono_time, m->ns, m->onion_c, options->local_discovery_enabled);
3491+
m->fr_c = new_friend_connections(m->log, m->mem, m->mono_time, m->ns, m->onion_c, m->dht, m->net_crypto, m->net, options->local_discovery_enabled);
34923492
}
34933493

34943494
if ((options->dht_announcements_enabled && (m->forwarding == nullptr || m->announce == nullptr)) ||

toxcore/announce.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -613,7 +613,7 @@ static int handle_dht_announce_request(
613613
}
614614

615615
Announcements *new_announcements(const Logger *log, const Memory *mem, const Random *rng, const Mono_Time *mono_time,
616-
Forwarding *forwarding)
616+
Forwarding *forwarding, DHT *dht, Networking_Core *net)
617617
{
618618
if (log == nullptr || mono_time == nullptr || forwarding == nullptr) {
619619
return nullptr;
@@ -630,8 +630,8 @@ Announcements *new_announcements(const Logger *log, const Memory *mem, const Ran
630630
announce->rng = rng;
631631
announce->forwarding = forwarding;
632632
announce->mono_time = mono_time;
633-
announce->dht = forwarding_get_dht(forwarding);
634-
announce->net = dht_get_net(announce->dht);
633+
announce->dht = dht;
634+
announce->net = net;
635635
announce->public_key = dht_get_self_public_key(announce->dht);
636636
announce->secret_key = dht_get_self_secret_key(announce->dht);
637637
new_hmac_key(announce->rng, announce->hmac_key);

toxcore/announce.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,14 @@
77

88
#include <stdint.h>
99

10+
#include "DHT.h"
1011
#include "attributes.h"
1112
#include "crypto_core.h"
1213
#include "forwarding.h"
1314
#include "logger.h"
1415
#include "mem.h"
1516
#include "mono_time.h"
17+
#include "network.h"
1618

1719
#define MAX_ANNOUNCEMENT_SIZE 512
1820

@@ -22,7 +24,7 @@ uint8_t announce_response_of_request_type(uint8_t request_type);
2224

2325
typedef struct Announcements Announcements;
2426

25-
Announcements *_Nullable new_announcements(const Logger *_Nonnull log, const Memory *_Nonnull mem, const Random *_Nonnull rng, const Mono_Time *_Nonnull mono_time, Forwarding *_Nonnull forwarding);
27+
Announcements *_Nullable new_announcements(const Logger *_Nonnull log, const Memory *_Nonnull mem, const Random *_Nonnull rng, const Mono_Time *_Nonnull mono_time, Forwarding *_Nonnull forwarding, DHT *_Nonnull dht, Networking_Core *_Nonnull net);
2628

2729
/**
2830
* @brief If data is stored, run `on_retrieve_callback` on it.

0 commit comments

Comments
 (0)