out_path to hex text

This commit is contained in:
Ben Menking
2026-05-30 12:50:42 -04:00
parent 3ac38b7fb6
commit 81216f289c
+2 -2
View File
@@ -121,7 +121,7 @@ class CoreParser {
if( strlen($payload) > CoreProtocol::PUB_KEY_SIZE + 2 ) {
$m->type = ord($payload[33]);
$m->flags = ord($payload[34]);
$m->out_path = substr($payload, 35, CoreProtocol::MAX_PATH_SIZE);
$m->out_path = self::formatPublicKey(substr($payload, 35, CoreProtocol::MAX_PATH_SIZE));
$m->name = substr($payload, 99, 32);
if( strlen($payload) > 204 ) {
@@ -332,7 +332,7 @@ class CoreParser {
$m->type = ord($payload[33]);
$m->flags = ord($payload[34]);
$m->out_path_len = ord($payload[35]);
$m->out_path = substr($payload, 36, 64);
$m->out_path = self::formatPublicKey(substr($payload, 36, 64));
$m->name = trim(substr($payload, 100, 32), ' ');
$m->last_advert_timestamp = date('r', unpack('V', substr($payload, 132, 4))[1]);
$m->lat = unpack('l', substr($payload, 136, 4))[1] / 1000000.0;