Commit Graph

10 Commits

Author SHA1 Message Date
iphydf 4c88fed2c9 refactor: Use std:: prefixes more consistently in C++ code. 2026-01-14 02:10:10 +00:00
iphydf 72452f2aeb test: Add some more tests for onion and shared key cache.
Also some other cleanups.
2026-01-13 23:43:56 +00:00
iphydf 8a8d02785e test(support): Introduce threaded Tox runner and simulation barrier
- Add `MpscQueue` for thread-safe task scheduling.
- Add `ToxRunner` to execute Tox instances in dedicated threads.
- Update `Simulation` to coordinate time steps across multiple runners using a synchronization barrier.
- Refactor `FakeMemory` and `FakeClock` to be thread-safe.
- Update `tox_network` helpers and tests to utilize the threaded runner infrastructure.
2026-01-11 22:51:59 +00:00
iphydf 8f92e710f3 perf: Add a timed limit of number of cookie requests.
Avoids being spammed by cookie requests and spending a lot of CPU on it.
2026-01-09 15:05:43 +00:00
iphydf 6d85c754e7 test(toxcore): add unit tests for net_crypto
Also:
- Add NULL checks for shared key retrieval in cookie handling.
- Add warning logs for handshake failures.
2026-01-07 20:40:31 +00:00
iphydf 9c22e79cc8 test(support): add SimulatedEnvironment for deterministic testing
Introduces a new testing support library 'testing/support' that provides
a clean, modular, and fully deterministic environment for testing
toxcore components.
2026-01-07 13:06:18 +00:00
iphydf d408c98209 refactor: Move Tox_Options to tox_options.h.
For backwards compatibility, we also `#include "tox_options.h"` in
`tox.h`, but in 0.3.0 we can break that so most toxcore client code
doesn't need the options, only the part that creates the instance.
2025-01-24 18:18:31 +00:00
iphydf 6460c25c9e refactor: Use merge_sort instead of qsort for sorting. 2024-12-05 18:33:21 +00:00
iphydf 0c05566e58 cleanup: Further #include cleanups. 2024-01-31 21:04:53 +00:00
iphydf 511bfe39c8 cleanup: Use Bazel modules to enforce proper #include hygiene. 2024-01-30 23:51:43 +00:00