@@ -74,18 +74,24 @@ func (c *Client) Start() {
7474 if c .Mode () == protocol .ProtocolModeNodeToNode {
7575 if version >= 11 {
7676 // TODO: make peer sharing mode configurable once it actually works
77- versionMap [version ] = [] interface {} {
78- c .config .NetworkMagic ,
79- diffusionMode ,
80- PeerSharingModeNoPeerSharing ,
81- QueryModeDisabled ,
77+ versionMap [version ] = NtNVersionDataPeerSharingQuery {
78+ NetworkMagic : c .config .NetworkMagic ,
79+ InitiatorAndResponderDiffusionMode : diffusionMode ,
80+ PeerSharing : PeerSharingModeNoPeerSharing ,
81+ Query : QueryModeDisabled ,
8282 }
8383 } else {
84- versionMap [version ] = []interface {}{c .config .NetworkMagic , diffusionMode }
84+ versionMap [version ] = NtNVersionDataLegacy {
85+ NetworkMagic : c .config .NetworkMagic ,
86+ InitiatorAndResponderDiffusionMode : diffusionMode ,
87+ }
8588 }
8689 } else {
8790 if (version - NodeToClientVersionOffset ) >= 15 {
88- versionMap [version ] = []any {c .config .NetworkMagic , QueryModeDisabled }
91+ versionMap [version ] = NtCVersionData {
92+ NetworkMagic : c .config .NetworkMagic ,
93+ Query : QueryModeDisabled ,
94+ }
8995 } else {
9096 versionMap [version ] = c .config .NetworkMagic
9197 }
@@ -122,6 +128,8 @@ func (c *Client) handleAcceptVersion(msgGeneric protocol.Message) error {
122128 msg := msgGeneric .(* MsgAcceptVersion )
123129 fullDuplex := false
124130 if c .Mode () == protocol .ProtocolModeNodeToNode {
131+ // TODO: switch to using the VersionData types
132+ // this is more annoying than it would seem until we fix some other things
125133 versionData := msg .VersionData .([]interface {})
126134 //nolint:gosimple
127135 if versionData [1 ].(bool ) == DiffusionModeInitiatorAndResponder {
0 commit comments