Mesh gossip (#381)

* wip mesh graph

* gossip fix

* gossip works

* source-based routing wip

* log
This commit is contained in:
callebtc
2025-09-08 15:15:32 +02:00
committed by GitHub
parent bea1bbf1a8
commit 0969c0641e
11 changed files with 621 additions and 38 deletions
@@ -240,6 +240,13 @@ class MessageHandler(private val myPeerID: String) {
previousPeerID = null
)
// Update mesh graph from gossip neighbors (only if TLV present)
try {
val neighborsOrNull = com.bitchat.android.services.meshgraph.GossipTLV.decodeNeighborsFromAnnouncementPayload(packet.payload)
com.bitchat.android.services.meshgraph.MeshGraphService.getInstance()
.updateFromAnnouncement(peerID, nickname, neighborsOrNull, packet.timestamp)
} catch (_: Exception) { }
Log.d(TAG, "✅ Processed verified TLV announce: stored identity for $peerID")
return isFirstAnnounce
}