diff --git a/config/config.go b/config/config.go index 7dcec53e7..75333e21b 100644 --- a/config/config.go +++ b/config/config.go @@ -22,7 +22,6 @@ type ArcConfig struct { MessageQueue *MessageQueueConfig `mapstructure:"messageQueue"` Tracing *TracingConfig `mapstructure:"tracing"` PeerRPC *PeerRPCConfig `mapstructure:"peerRpc"` - Broadcasting *BroadcastingConfig `mapstructure:"broadcasting"` Metamorph *MetamorphConfig `mapstructure:"metamorph"` Blocktx *BlocktxConfig `mapstructure:"blocktx"` API *APIConfig `mapstructure:"api"` @@ -41,21 +40,6 @@ func (p *PrometheusConfig) IsEnabled() bool { return p.Enabled && p.Addr != "" && p.Endpoint != "" } -type BroadcastingConfig struct { - Mode string `mapstructure:"mode"` - Multicast *Mulsticast `mapstructure:"multicast"` - Unicast *Unicast `mapstructure:"unicast"` -} - -type Unicast struct { - Peers []*PeerConfig `mapstructure:"peers"` -} -type Mulsticast struct { - Ipv6Enabled bool `mapstructure:"ipv6Enabled"` - MulticastGroups []*string `mapstructure:"multicastGroups"` - Interfaces []*string `mapstructure:"interfaces"` -} - type PeerConfig struct { Host string `mapstructure:"host"` Port *PeerPortConfig `mapstructure:"port"` diff --git a/config/defaults.go b/config/defaults.go index e03ac5c14..022b57ef1 100644 --- a/config/defaults.go +++ b/config/defaults.go @@ -17,7 +17,6 @@ func getDefaultArcConfig() *ArcConfig { MessageQueue: getDefaultMessageQueueConfig(), Tracing: getDefaultTracingConfig(), PeerRPC: getDefaultPeerRPCConfig(), - Broadcasting: getBroadcastingConfig(), Metamorph: getMetamorphConfig(), Blocktx: getBlocktxConfig(), API: getAPIConfig(), @@ -54,40 +53,6 @@ func getDefaultPeerRPCConfig() *PeerRPCConfig { } } -func getBroadcastingConfig() *BroadcastingConfig { - return &BroadcastingConfig{ - Mode: "unicast", - Unicast: &Unicast{ - Peers: []*PeerConfig{ - { - Host: "localhost", - Port: &PeerPortConfig{ - P2P: 18333, - ZMQ: 28332, - }, - }, - { - Host: "localhost", - Port: &PeerPortConfig{ - P2P: 18334, - }, - }, - { - Host: "localhost", - Port: &PeerPortConfig{ - P2P: 18335, - }, - }, - }, - }, - Multicast: &Mulsticast{ - Ipv6Enabled: false, - MulticastGroups: nil, - Interfaces: nil, - }, - } -} - func getMetamorphConfig() *MetamorphConfig { return &MetamorphConfig{ ListenAddr: "localhost:8001", diff --git a/config/example_config.yaml b/config/example_config.yaml index 6f96d59f3..b2ce2ec51 100644 --- a/config/example_config.yaml +++ b/config/example_config.yaml @@ -27,28 +27,6 @@ peerRpc: # rpc configuration for bitcoin node host: localhost port: 18332 -broadcasting: # settings for connection to nodes - mode: unicast # one of unicast | multicast - multicast: - ipv6Enabled: true # indicates whether ipv6 is enabled for multicasting - multicastGroups: # must be specified if mode = multicast - - "172.28.56.77" # address of multicast group, needs to be ipv6 address if ipv6 is enabled - interfaces: - - "eth0" - - "eth1" - unicast: - peers: # list of bitcoin node peers to connect to - - host: localhost - port: - p2p: 18333 # port for p2p connection - zmq: 28332 # port for zmq connection - - host: localhost - port: - p2p: 18334 - - host: localhost - port: - p2p: 18335 - cache: engine: redis # cache engine - one of in-memory | redis redis: # redis cache configuration in case that engine: redis diff --git a/config/load_test.go b/config/load_test.go index 2da6cfd27..50f9a9cc8 100644 --- a/config/load_test.go +++ b/config/load_test.go @@ -36,12 +36,6 @@ func Test_Load(t *testing.T) { assert.Equal(t, "INFO", actualConfig.LogLevel) assert.Equal(t, "text", actualConfig.LogFormat) assert.Equal(t, "mainnet", actualConfig.Network) - assert.Equal(t, 18335, actualConfig.Broadcasting.Unicast.Peers[2].Port.P2P) - assert.Equal(t, "172.28.56.77", *actualConfig.Broadcasting.Multicast.MulticastGroups[0]) - assert.Equal(t, true, actualConfig.Broadcasting.Multicast.Ipv6Enabled) - assert.Equal(t, "unicast", actualConfig.Broadcasting.Mode) - assert.Equal(t, "eth1", *actualConfig.Broadcasting.Multicast.Interfaces[1]) - assert.Equal(t, 18335, actualConfig.Broadcasting.Unicast.Peers[2].Port.P2P) assert.NotNil(t, actualConfig.Tracing) assert.Equal(t, "http://tracing:1234", actualConfig.Tracing.DialAddr) }) diff --git a/config/test_files/config.yaml b/config/test_files/config.yaml index 2c05415c3..a9cd16ede 100644 --- a/config/test_files/config.yaml +++ b/config/test_files/config.yaml @@ -5,24 +5,3 @@ network: mainnet tracing: dialAddr: http://tracing:1234 sample: 10 # sampling in percentage -broadcasting: # settings for connection to nodes - mode: unicast # one of unicast | multicast - multicast: - ipv6Enabled: true # indicates whether ipv6 is enabled for multicasting - multicastGroups: # must be specified if mode = multicast - - "172.28.56.77" # address of multicast group, needs to be ipv6 address if ipv6 is enabled - interfaces: - - "eth0" - - "eth1" - unicast: - peers: # list of bitcoin node peers to connect to - - host: localhost - port: - p2p: 18333 # port for p2p connection - zmq: 28332 # port for zmq connection - - host: localhost - port: - p2p: 18334 - - host: localhost - port: - p2p: 18335 diff --git a/test/config/config.yaml b/test/config/config.yaml index ba7181c06..dbf4b0ae3 100644 --- a/test/config/config.yaml +++ b/test/config/config.yaml @@ -7,7 +7,6 @@ prometheus: endpoint: /metrics addr: :2112 grpcMessageSize: 100000000 -network: regtest messageQueue: streaming: enabled: true @@ -24,23 +23,6 @@ peerRpc: host: node1 port: 18332 -broadcasting: - mode: unicast - unicast: - peers: - - host: node1 - port: - p2p: 18333 - zmq: 28332 - - host: node2 - port: - p2p: 18333 - zmq: 28332 - - host: node3 - port: - p2p: 18333 - zmq: 28332 - cache: engine: redis redis: