negentropy: return our version if we are a server and got the wrong version (blergh).

This commit is contained in:
fiatjaf 2024-09-20 17:47:47 -03:00
parent b870a78622
commit 0bcefc86ef

View File

@ -96,7 +96,12 @@ func (n *Negentropy) reconcileAux(reader *StringHexReader) (string, error) {
return "", fmt.Errorf("failed to read pv: %w", err)
}
if pv != protocolVersion {
return "", fmt.Errorf("unsupported negentropy protocol version %v", pv)
if n.isClient {
return "", fmt.Errorf("unsupported negentropy protocol version %v", pv)
}
// if we're a server we just return our protocol version
return fullOutput.Hex(), nil
}
var prevBound Bound