Commit Graph
6 Commits
Author SHA1 Message Date
Christoph Koehler 4f701b7aec refactor: split MeshTables::hasSeen into pure query + markSeen
hasSeen() was simultaneously a predicate and a mutator — it inserted the
packet hash on every miss, making five call sites that only wanted to mark
a packet as sent call it with the return value discarded.

Split into:
- wasSeen()   — pure predicate, no side effects
- markSeen()  — explicit insert

All query sites now call markSeen() immediately after wasSeen() returns
false, preserving identical runtime behaviour. The five mark-only send
sites (sendFlood, sendDirect, sendZeroHop x2) now call markSeen directly.

Also fixes three bridge sites (BridgeBase, ESPNowBridge, RS232Bridge)
that had the same query+implicit-insert pattern.

Tests: add test/test_mesh_tables/ covering wasSeen purity, markSeen,
dup stats, and clear. Update SHA256 mock to produce deterministic output
(previously finalize() was a no-op). Add Packet.cpp to native build filter.
2026-07-01 21:51:38 -06:00
João Brázio fb46e5cc8a Refactor debug logging across bridge implementations 2025-10-06 12:57:04 +01:00
João Brázio 8edcb46a28 Bridge: enhance CLI configuration options 2025-10-03 00:20:09 +01:00
João Brázio 1d45c7ec66 Add bridge management CLI 2025-09-24 16:30:00 +01:00
João Brázio a55fa8d8ec Add BRIDGE_DELAY as a buffer to prevent immediate processing conflicts in the mesh network 2025-09-08 20:21:33 +01:00
João Brázio 0051ccef26 Refactor bridge implementations to inherit from BridgeBase 2025-09-08 02:03:08 +01:00