ax(node): replace prose comment with usage examples on IsProtocolVersionSupported
Co-Authored-By: Charon <charon@lethean.io>
This commit is contained in:
parent
f4dbfcc251
commit
28dfe3f31e
1 changed files with 2 additions and 1 deletions
|
|
@ -19,7 +19,8 @@ const (
|
|||
// Used for version negotiation during handshake.
|
||||
var SupportedProtocolVersions = []string{"1.0"}
|
||||
|
||||
// IsProtocolVersionSupported checks if a given version is supported.
|
||||
// if node.IsProtocolVersionSupported(peerVersion) { proceed() }
|
||||
// if !node.IsProtocolVersionSupported("2.0") { return errUnsupportedVersion }
|
||||
func IsProtocolVersionSupported(version string) bool {
|
||||
for _, supported := range SupportedProtocolVersions {
|
||||
if supported == version {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue