mirror of
https://github.com/nbd-wtf/go-nostr.git
synced 2025-03-28 18:51:53 +01:00
negentropy: return our version if we are a server and got the wrong version (blergh).
This commit is contained in:
parent
b870a78622
commit
0bcefc86ef
@ -96,7 +96,12 @@ func (n *Negentropy) reconcileAux(reader *StringHexReader) (string, error) {
|
|||||||
return "", fmt.Errorf("failed to read pv: %w", err)
|
return "", fmt.Errorf("failed to read pv: %w", err)
|
||||||
}
|
}
|
||||||
if pv != protocolVersion {
|
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
|
var prevBound Bound
|
||||||
|
Loading…
x
Reference in New Issue
Block a user