show routing path to contact

This commit is contained in:
liamcottle 2025-02-12 01:10:17 +13:00
parent 46b18d00ae
commit 6ffd7ef270
3 changed files with 13 additions and 2 deletions

View file

@ -83,7 +83,7 @@ class Connection extends EventEmitter {
data.writeBytes(publicKey);
data.writeByte(type);
data.writeByte(flags);
data.writeByte(outPathLen);
data.writeByte(outPathLen); // todo writeInt8
data.writeBytes(outPath); // 64 bytes
data.writeCString(advName, 32); // 32 bytes
data.writeUInt32LE(lastAdvert);
@ -211,7 +211,7 @@ class Connection extends EventEmitter {
publicKey: bufferReader.readBytes(32),
type: bufferReader.readByte(),
flags: bufferReader.readByte(),
outPathLen: bufferReader.readByte(),
outPathLen: bufferReader.readInt8(),
outPath: bufferReader.readBytes(64),
advName: bufferReader.readCString(32),
lastAdvert: bufferReader.readUInt32LE(),