Skip to content

Commit

Permalink
more lint
Browse files Browse the repository at this point in the history
  • Loading branch information
misko9 committed Nov 21, 2024
1 parent 0a06baf commit c3460c8
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions chain/thorchain/api_query.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,21 @@ import (
)

// Generic query for routes not yet supported here.
func (c *Thorchain) ApiQuery(ctx context.Context, path string, args ...string) (any, error) {
func (c *Thorchain) APIQuery(ctx context.Context, path string, args ...string) (any, error) {
url := fmt.Sprintf("%s/%s", c.GetAPIAddress(), path)
var res any
err := get(ctx, url, &res)
return res, err
}

func (c *Thorchain) ApiGetNode(ctx context.Context, addr string) (OpenapiNode, error) {
func (c *Thorchain) APIGetNode(ctx context.Context, addr string) (OpenapiNode, error) {
url := fmt.Sprintf("%s/thorchain/node/%s", c.GetAPIAddress(), addr)
var node OpenapiNode
err := get(ctx, url, &node)
return node, err
}

func (c *Thorchain) ApiGetNodes(ctx context.Context) ([]OpenapiNode, error) {
func (c *Thorchain) APIGetNodes(ctx context.Context) ([]OpenapiNode, error) {
url := fmt.Sprintf("%s/thorchain/nodes", c.GetAPIAddress())
var nodes []OpenapiNode
err := get(ctx, url, &nodes)
Expand Down
2 changes: 1 addition & 1 deletion chain/thorchain/module_thorchain.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ func (tn *ChainNode) SetNodeKeys(ctx context.Context) error {
}

// Sets validator ip address, must be called by validator.
func (tn *ChainNode) SetIpAddress(ctx context.Context) error {
func (tn *ChainNode) SetIPAddress(ctx context.Context) error {
_, err := tn.ExecTx(ctx,
valKey, "thorchain", "set-ip-address", tn.NodeAccount.IPAddress,
)
Expand Down
2 changes: 1 addition & 1 deletion chain/thorchain/thorchain.go
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ func (c *Thorchain) AddValidators(ctx context.Context, configFileOverrides map[s
return fmt.Errorf("failed to set val %d node keys, %w", i, err)
}
// thornode tx thorchain set-ip-address "192.168.0.10"
if err := val.SetIpAddress(ctx); err != nil {
if err := val.SetIPAddress(ctx); err != nil {
return fmt.Errorf("failed to set val %d ip address, %w", i, err)
}
// thornode tx thorchain set-version
Expand Down
4 changes: 2 additions & 2 deletions chain/thorchain/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ type OpenapiNode struct {
// the consensus pub key for the node
ValidatorConsPubKey string `json:"validator_cons_pub_key"`
// the P2PID (:6040/p2pid endpoint) of the node
PeerId string `json:"peer_id"`
PeerID string `json:"peer_id"`
// the block height at which the node became active
ActiveBlockHeight int64 `json:"active_block_height"`
// the block height of the current provided information for the node
Expand All @@ -45,7 +45,7 @@ type OpenapiNode struct {
// indicates whether the node has been forced to leave by the network, typically via ban
ForcedToLeave bool `json:"forced_to_leave"`
LeaveHeight int64 `json:"leave_height"`
IpAddress string `json:"ip_address"`
IPAddress string `json:"ip_address"`
// the currently set version of the node
Version string `json:"version"`
// the accumulated slash points, reset at churn but excessive slash points may carry over
Expand Down

0 comments on commit c3460c8

Please sign in to comment.