mirror of
https://github.com/permissionlesstech/bitchat-android.git
synced 2026-07-25 16:45:20 +00:00
v2 source routing
This commit is contained in:
@@ -1334,7 +1334,8 @@ class BluetoothMeshService(private val context: Context) {
|
|||||||
val intermediates = path.subList(1, path.size - 1)
|
val intermediates = path.subList(1, path.size - 1)
|
||||||
val hopsBytes = intermediates.map { hexStringToByteArray(it) }
|
val hopsBytes = intermediates.map { hexStringToByteArray(it) }
|
||||||
Log.d(TAG, "✅ Signed packet type ${packet.type} (route ${hopsBytes.size} hops: $intermediates)")
|
Log.d(TAG, "✅ Signed packet type ${packet.type} (route ${hopsBytes.size} hops: $intermediates)")
|
||||||
packet.copy(route = hopsBytes)
|
// Attach route and upgrade to v2 (required for HAS_ROUTE flag)
|
||||||
|
packet.copy(route = hopsBytes, version = 2u)
|
||||||
} else packet.copy(route = null)
|
} else packet.copy(route = null)
|
||||||
} else packet
|
} else packet
|
||||||
} catch (_: Exception) { packet }
|
} catch (_: Exception) { packet }
|
||||||
|
|||||||
Reference in New Issue
Block a user