mirror of
https://github.com/ratspeak/microReticulum
synced 2026-11-22 23:10:38 +00:00
Skip announce packet caching on non-transport endpoints
Only cache announce packets when transport is enabled, preventing unnecessary storage on endpoint-only nodes that don't rebroadcast.
This commit is contained in:
1 parent
af9fbab780
commit
184e6b0250
1 file changed
+6
-4
+6
-4
@@ -1985,10 +1985,12 @@ Transport::DestinationEntry empty_destination_entry;
|
||||
new_announce.send();
|
||||
}
|
||||
|
||||
// CBA Culling before adding to esnure table does not exceed maxsize
|
||||
TRACEF("Caching packet %s", packet.get_hash().toHex().c_str());
|
||||
if (RNS::Transport::cache_packet(packet, true)) {
|
||||
packet.cached(true);
|
||||
// Cache announce packets only for transport nodes (endpoints don't rebroadcast)
|
||||
if (Reticulum::transport_enabled()) {
|
||||
TRACEF("Caching packet %s", packet.get_hash().toHex().c_str());
|
||||
if (RNS::Transport::cache_packet(packet, true)) {
|
||||
packet.cached(true);
|
||||
}
|
||||
}
|
||||
//TRACEF("Adding packet %s to packet table", packet.get_hash().toHex().c_str());
|
||||
//PacketEntry packet_entry(packet);
|
||||
|
||||
Reference in new issue
Block a user