This commit is contained in:
callebtc
2025-09-05 23:47:19 +02:00
parent a5928987fe
commit 11353afd72
2 changed files with 2 additions and 1 deletions
@@ -1001,6 +1001,7 @@ class BluetoothMeshService(private val context: Context) {
// Exclude first (sender) and last (recipient); only intermediates
val intermediates = path.subList(1, path.size - 1)
val hopsBytes = intermediates.map { hexStringToByteArray(it) }
Log.d(TAG, "✅ Signed packet type ${packet.type} (route ${hopsBytes.size} hops: $intermediates)")
packet.copy(route = hopsBytes)
} else packet.copy(route = null)
} else packet
@@ -58,7 +58,7 @@ data class BitchatPacket(
val payload: ByteArray,
var signature: ByteArray? = null, // Changed from val to var for packet signing
var ttl: UByte,
var route: List<ByteArray>? = null // Optional source route: ordered list of peerIDs (8 bytes each), including sender and final recipient
var route: List<ByteArray>? = null // Optional source route: ordered list of peerIDs (8 bytes each), not including sender and final recipient
) : Parcelable {
constructor(