diff --git a/chain/thorchain/api_query.go b/chain/thorchain/api_query.go index 8366d21ac..8839f3f6c 100644 --- a/chain/thorchain/api_query.go +++ b/chain/thorchain/api_query.go @@ -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) diff --git a/chain/thorchain/module_thorchain.go b/chain/thorchain/module_thorchain.go index f1eff58d0..aabf31da1 100644 --- a/chain/thorchain/module_thorchain.go +++ b/chain/thorchain/module_thorchain.go @@ -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, ) diff --git a/chain/thorchain/thorchain.go b/chain/thorchain/thorchain.go index 9376e02fc..8e77db0be 100644 --- a/chain/thorchain/thorchain.go +++ b/chain/thorchain/thorchain.go @@ -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 diff --git a/chain/thorchain/types.go b/chain/thorchain/types.go index bb684b70b..92e7dc7f2 100644 --- a/chain/thorchain/types.go +++ b/chain/thorchain/types.go @@ -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 @@ -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