From 0a06baff6b303b9c326d3b792043d6f1e2a9da69 Mon Sep 17 00:00:00 2001 From: Steve Miskovetz Date: Thu, 21 Nov 2024 09:31:42 -0700 Subject: [PATCH] lint --- chain/thorchain/api_query.go | 2 +- chain/thorchain/module_thorchain.go | 8 +++--- chain/thorchain/thorchain.go | 6 ++--- chain/thorchain/types.go | 38 ++++++++++++++--------------- 4 files changed, 27 insertions(+), 27 deletions(-) diff --git a/chain/thorchain/api_query.go b/chain/thorchain/api_query.go index 0f4b12bb0..8366d21ac 100644 --- a/chain/thorchain/api_query.go +++ b/chain/thorchain/api_query.go @@ -19,7 +19,7 @@ import ( "github.com/strangelove-ventures/interchaintest/v8/chain/thorchain/common" ) -// Generic query for routes not yet supported here +// Generic query for routes not yet supported here. func (c *Thorchain) ApiQuery(ctx context.Context, path string, args ...string) (any, error) { url := fmt.Sprintf("%s/%s", c.GetAPIAddress(), path) var res any diff --git a/chain/thorchain/module_thorchain.go b/chain/thorchain/module_thorchain.go index 2abf3fac8..f1eff58d0 100644 --- a/chain/thorchain/module_thorchain.go +++ b/chain/thorchain/module_thorchain.go @@ -51,7 +51,7 @@ func (tn *ChainNode) Bond(ctx context.Context, amount math.Int) error { return err } -// Sets validator node keys, must be called by validator +// Sets validator node keys, must be called by validator. func (tn *ChainNode) SetNodeKeys(ctx context.Context) error { _, err := tn.ExecTx(ctx, valKey, "thorchain", "set-node-keys", @@ -60,7 +60,7 @@ func (tn *ChainNode) SetNodeKeys(ctx context.Context) error { return err } -// Sets validator ip address, must be called by validator +// Sets validator ip address, must be called by validator. func (tn *ChainNode) SetIpAddress(ctx context.Context) error { _, err := tn.ExecTx(ctx, valKey, "thorchain", "set-ip-address", tn.NodeAccount.IPAddress, @@ -68,10 +68,10 @@ func (tn *ChainNode) SetIpAddress(ctx context.Context) error { return err } -// Sets validator's binary version +// Sets validator's binary version. func (tn *ChainNode) SetVersion(ctx context.Context) error { _, err := tn.ExecTx(ctx, valKey, "thorchain", "set-version", ) return err -} \ No newline at end of file +} diff --git a/chain/thorchain/thorchain.go b/chain/thorchain/thorchain.go index 899379547..9376e02fc 100644 --- a/chain/thorchain/thorchain.go +++ b/chain/thorchain/thorchain.go @@ -208,8 +208,8 @@ func (c *Thorchain) AddValidators(ctx context.Context, configFileOverrides map[s // Fund validator from faucet if err := c.SendFunds(ctx, "faucet", ibc.WalletAmount{ Address: c.Validators[i].NodeAccount.NodeAddress, - Amount: sdkmath.NewInt(100).MulRaw(decimalPow), // 100e8 rune - Denom: c.cfg.Denom, + Amount: sdkmath.NewInt(100).MulRaw(decimalPow), // 100e8 rune + Denom: c.cfg.Denom, }); err != nil { return fmt.Errorf("failed to fund val %d, %w", i, err) } @@ -245,7 +245,7 @@ func (c *Thorchain) AddValidators(ctx context.Context, configFileOverrides map[s return c.StartAllValSidecars(ctx) } -// AddDuplicateValidator spins up a duplicate validator node to test double signing +// AddDuplicateValidator spins up a duplicate validator node to test double signing. func (c *Thorchain) AddDuplicateValidator(ctx context.Context, configFileOverrides map[string]any, originalVal *ChainNode) (*ChainNode, error) { // Get peer string for existing nodes peers := c.Nodes().PeerString(ctx) diff --git a/chain/thorchain/types.go b/chain/thorchain/types.go index 7b345a453..bb684b70b 100644 --- a/chain/thorchain/types.go +++ b/chain/thorchain/types.go @@ -24,9 +24,9 @@ type NodeAccount struct { } type OpenapiNode struct { - NodeAddress string `json:"node_address"` - Status string `json:"status"` - PubKeySet NodeAccountPubKeySet `json:"pub_key_set"` + NodeAddress string `json:"node_address"` + Status string `json:"status"` + PubKeySet NodeAccountPubKeySet `json:"pub_key_set"` // the consensus pub key for the node ValidatorConsPubKey string `json:"validator_cons_pub_key"` // the P2PID (:6040/p2pid endpoint) of the node @@ -34,26 +34,26 @@ type OpenapiNode struct { // 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 - StatusSince int64 `json:"status_since"` + StatusSince int64 `json:"status_since"` NodeOperatorAddress string `json:"node_operator_address"` // current node bond - TotalBond string `json:"total_bond"` + TotalBond string `json:"total_bond"` BondProviders NodeBondProviders `json:"bond_providers"` // the set of vault public keys of which the node is a member SignerMembership []string `json:"signer_membership"` - RequestedToLeave bool `json:"requested_to_leave"` + RequestedToLeave bool `json:"requested_to_leave"` // 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"` + ForcedToLeave bool `json:"forced_to_leave"` + LeaveHeight int64 `json:"leave_height"` + 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 - SlashPoints int64 `json:"slash_points"` - Jail NodeJail `json:"jail"` - CurrentAward string `json:"current_award"` + SlashPoints int64 `json:"slash_points"` + Jail NodeJail `json:"jail"` + CurrentAward string `json:"current_award"` // the last observed heights for all chain by the node - ObserveChains []ChainHeight `json:"observe_chains"` + ObserveChains []ChainHeight `json:"observe_chains"` PreflightStatus NodePreflightStatus `json:"preflight_status"` } @@ -62,7 +62,7 @@ type NodePreflightStatus struct { Status string `json:"status"` // the reason for the transition to the next status Reason string `json:"reason"` - Code int64 `json:"code"` + Code int64 `json:"code"` } type NodeBondProviders struct { @@ -74,17 +74,17 @@ type NodeBondProviders struct { type NodeBondProvider struct { BondAddress *string `json:"bond_address,omitempty"` - Bond *string `json:"bond,omitempty"` + Bond *string `json:"bond,omitempty"` } type NodeJail struct { - ReleaseHeight *int64 `json:"release_height,omitempty"` - Reason *string `json:"reason,omitempty"` + ReleaseHeight *int64 `json:"release_height,omitempty"` + Reason *string `json:"reason,omitempty"` } type ChainHeight struct { - Chain string `json:"chain"` - Height int64 `json:"height"` + Chain string `json:"chain"` + Height int64 `json:"height"` } // ProtoMessage is implemented by generated protocol buffer messages.