Skip to content

Commit

Permalink
morph: delete duplicated endpoints field
Browse files Browse the repository at this point in the history
Signed-off-by: Andrey Butusov <andrey@nspcc.io>
  • Loading branch information
End-rey committed Nov 7, 2024
1 parent dd161c7 commit 3b0bbc4
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 4 deletions.
2 changes: 0 additions & 2 deletions pkg/morph/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,6 @@ type Client struct {

cfg cfg

endpoints []string

subs subscriptions

// channel for internal stop
Expand Down
1 change: 0 additions & 1 deletion pkg/morph/client/constructor.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,6 @@ func New(key *keys.PrivateKey, opts ...Option) (*Client, error) {
return nil, errors.New("no endpoints were provided")
}

cli.endpoints = cfg.endpoints
conn = cli.connEndpoints()
if conn == nil {
err = errors.New("could not establish Neo RPC connection")
Expand Down
2 changes: 1 addition & 1 deletion pkg/morph/client/multi.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func (c *Client) switchRPC() *connection {

func (c *Client) connEndpoints() *connection {
// Iterate endpoints.
for _, e := range c.endpoints {
for _, e := range c.cfg.endpoints {
conn, err := c.newConnection(e)
if err != nil {
c.logger.Warn("could not establish connection to RPC node",
Expand Down

0 comments on commit 3b0bbc4

Please sign in to comment.