mirror of
https://github.com/TokTok/c-toxcore
synced 2026-04-27 02:05:41 +00:00
d9f6f04e0a
The test was flaky due to a race condition in moderation event sync: `wait_for_peer_role` was only checking a peer's self-view of its own role via mirrored context, rather than ensuring other peers performing subsequent moderation actions had actually received and processed the broadcast. This caused divergent sanctions lists between nodes, leading to `Invalid credentials hash` warnings and test timeouts when subsequent moderation actions (like Barrier 5/6) were rejected by nodes that hadn't yet processed previous updates. Fixed by using `tox_group_peer_get_role` in `wait_for_peer_role` to ensure the calling node has locally processed the role update before proceeding past a synchronization barrier.