Support for Noise machines in getPeers
@@ -600,12 +600,15 @@ func (machine Machine) toNode(
}
var machineKey key.MachinePublic
+ if machine.MachineKey != "" {
+ // MachineKey is only used in the legacy protocol
err = machineKey.UnmarshalText(
[]byte(MachinePublicKeyEnsurePrefix(machine.MachineKey)),
)
if err != nil {
return nil, fmt.Errorf("failed to parse machine public key: %w", err)
}
+ }
var discoKey key.DiscoPublic
if machine.DiscoKey != "" {
