diff --git a/connmanager/connection_manager.go b/connmanager/connection_manager.go index 511814d..2f9726a 100644 --- a/connmanager/connection_manager.go +++ b/connmanager/connection_manager.go @@ -33,7 +33,6 @@ type ConnectionManagerTag uint16 const ( ConnectionManagerTagNone ConnectionManagerTag = iota - ConnectionManagerTagHostProducer ConnectionManagerTagHostLocalRoot ConnectionManagerTagHostPublicRoot ConnectionManagerTagHostBootstrapPeer @@ -47,7 +46,6 @@ const ( func (c ConnectionManagerTag) String() string { tmp := map[ConnectionManagerTag]string{ - ConnectionManagerTagHostProducer: "HostProducer", ConnectionManagerTagHostLocalRoot: "HostLocalRoot", ConnectionManagerTagHostPublicRoot: "HostPublicRoot", ConnectionManagerTagHostBootstrapPeer: "HostBootstrapPeer", @@ -123,9 +121,6 @@ func (c *ConnectionManager) AddHost( func (c *ConnectionManager) AddHostsFromTopology( topologyConfig *topology.TopologyConfig, ) { - for _, host := range topologyConfig.Producers { - c.AddHost(host.Address, host.Port, ConnectionManagerTagHostProducer) - } for _, bootstrapPeer := range topologyConfig.BootstrapPeers { c.AddHost( bootstrapPeer.Address, diff --git a/outbound.go b/outbound.go index 48eb625..671ce2f 100644 --- a/outbound.go +++ b/outbound.go @@ -49,21 +49,6 @@ func (n *Node) startOutboundConnections() { "role", "client", ) var tmpHosts []string - for _, host := range n.config.topologyConfig.Producers { - n.config.logger.Debug( - fmt.Sprintf( - "adding legacy topology host: %s:%d", - host.Address, - host.Port, - ), - "component", "network", - "role", "client", - ) - tmpHosts = append( - tmpHosts, - net.JoinHostPort(host.Address, strconv.Itoa(int(host.Port))), - ) - } for _, host := range n.config.topologyConfig.BootstrapPeers { n.config.logger.Debug( fmt.Sprintf( diff --git a/topology/topology.go b/topology/topology.go index 0a2ed2a..4fa28a9 100644 --- a/topology/topology.go +++ b/topology/topology.go @@ -22,21 +22,12 @@ import ( // TopologyConfig represents a Cardano node topology config type TopologyConfig struct { - Producers []TopologyConfigLegacyProducer `json:"Producers"` LocalRoots []TopologyConfigP2PLocalRoot `json:"localRoots"` PublicRoots []TopologyConfigP2PPublicRoot `json:"publicRoots"` BootstrapPeers []TopologyConfigP2PBootstrapPeer `json:"bootstrapPeers"` UseLedgerAfterSlot int64 `json:"useLedgerAfterSlot"` } -type TopologyConfigLegacyProducer struct { - Address string `json:"addr"` - Port uint `json:"port"` - Valency uint `json:"valency"` - Continent string `json:"continent"` - State string `json:"state"` -} - type TopologyConfigP2PAccessPoint struct { Address string `json:"address"` Port uint `json:"port"` diff --git a/topology/topology_test.go b/topology/topology_test.go index c3f37b5..4abe7d2 100644 --- a/topology/topology_test.go +++ b/topology/topology_test.go @@ -30,28 +30,6 @@ type topologyTestDefinition struct { var topologyTests = []topologyTestDefinition{ { jsonData: ` -{ - "Producers": [ - { - "addr": "backbone.cardano.iog.io", - "port": 3001, - "valency": 2 - } - ] -} -`, - expectedObject: &topology.TopologyConfig{ - Producers: []topology.TopologyConfigLegacyProducer{ - { - Address: "backbone.cardano.iog.io", - Port: 3001, - Valency: 2, - }, - }, - }, - }, - { - jsonData: ` { "localRoots": [ {