@@ -68,7 +68,7 @@ type Environment struct {
6868 // IMPORTANT NOTICE:
6969 // SINCE RELAYS FOR A NODE IS STORED ON THE CHAIN IN A LIMITED SPACE
7070 // PLEASE MAKE SURE THAT ANY ENV HAS NO MORE THAN FOUR RELAYS CONFIGURED
71- relaysURLs []string
71+ RelaysURLs []string
7272 ActivationURL []string
7373 GraphQL []string
7474 GeoipURLs []string
@@ -134,7 +134,7 @@ var (
134134 "wss://tfchain.dev.grid.tf/" ,
135135 "wss://tfchain.02.dev.grid.tf" ,
136136 },
137- relaysURLs : []string {
137+ RelaysURLs : []string {
138138 "wss://relay.dev.grid.tf" ,
139139 },
140140 ActivationURL : []string {
@@ -161,7 +161,7 @@ var (
161161 "wss://tfchain.test.grid.tf/" ,
162162 "wss://tfchain.02.test.grid.tf" ,
163163 },
164- relaysURLs : []string {
164+ RelaysURLs : []string {
165165 "wss://relay.test.grid.tf" ,
166166 },
167167 ActivationURL : []string {
@@ -188,7 +188,7 @@ var (
188188 "wss://tfchain.qa.grid.tf/" ,
189189 "wss://tfchain.02.qa.grid.tf/" ,
190190 },
191- relaysURLs : []string {
191+ RelaysURLs : []string {
192192 "wss://relay.qa.grid.tf" ,
193193 },
194194 ActivationURL : []string {
@@ -218,7 +218,7 @@ var (
218218 "wss://03.tfchain.grid.tf/" ,
219219 "wss://04.tfchain.grid.tf/" ,
220220 },
221- relaysURLs : []string {
221+ RelaysURLs : []string {
222222 "wss://relay.grid.tf" ,
223223 },
224224 ActivationURL : []string {
@@ -266,18 +266,6 @@ func Get() (Environment, error) {
266266 return env , nil
267267}
268268
269- func GetRelaysURLs () []string {
270- config , err := GetConfig ()
271- if err == nil && len (config .RelaysURLs ) > 0 {
272- log .Debug ().Msg ("using relays urls from zos-config" )
273- return config .RelaysURLs
274- }
275-
276- log .Debug ().Msg ("using relays urls from environment" )
277- env := MustGet ()
278- return env .relaysURLs
279- }
280-
281269// GetSubstrate gets a client to subsrate blockchain
282270func GetSubstrate () (substrate.Manager , error ) {
283271 env , err := Get ()
@@ -356,9 +344,9 @@ func getEnvironmentFromParams(params kernel.Params) (Environment, error) {
356344 }
357345
358346 if relay , ok := params .Get ("relay" ); ok && len (relay ) > 0 {
359- env .relaysURLs = relay
347+ env .RelaysURLs = relay
360348 } else if relay := config .RelaysURLs ; len (relay ) > 0 {
361- env .relaysURLs = relay
349+ env .RelaysURLs = relay
362350 }
363351
364352 if activation , ok := params .Get ("activation" ); ok && len (activation ) > 0 {
0 commit comments