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:
DeFiDude committed 2026-03-10 22:40:57 -06:00
1 parent af9fbab780
commit 184e6b0250
1 file changed
+6 -4
+6 -4
View File
@@ -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);