sync with dev

This commit is contained in:
liquidraver committed 2026-07-02 13:13:26 +02:00
1 parent 4d16dc7589
commit fc940d27ba
16 files changed
+79 -24

No files matched your search

+2 -1
View File
@@ -21,7 +21,8 @@ struct GroupChannel {
class MeshTables {
public:
virtual bool hasSeen(const Packet *packet) = 0;
virtual bool wasSeen(const Packet *packet) = 0; /* pure query, no insert */
virtual void markSeen(const Packet *packet) = 0; /* explicit insert */
virtual void clear(const Packet *packet) = 0;
};
+7 -2
View File
@@ -24,7 +24,7 @@ public:
_direct_dups = _flood_dups = 0;
}
bool hasSeen(const Packet *packet) override {
bool wasSeen(const Packet *packet) override {
uint8_t hash[MAX_HASH_SIZE];
packet->calculatePacketHash(hash);
const uint8_t *sp = _hashes;
@@ -38,9 +38,14 @@ public:
return true;
}
}
return false;
}
void markSeen(const Packet *packet) override {
uint8_t hash[MAX_HASH_SIZE];
packet->calculatePacketHash(hash);
memcpy(&_hashes[_next_idx * MAX_HASH_SIZE], hash, MAX_HASH_SIZE);
_next_idx = (_next_idx + 1) % MAX_PACKET_HASHES;
return false;
}
void clear(const Packet *packet) override {