Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
DylanTinianov committed Jan 6, 2025
1 parent e65e165 commit a604f35
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion common/txmgr/resender.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ import (
"context"
"errors"
"fmt"
"github.com/smartcontractkit/chainlink-framework/multinode"
"time"

"github.com/smartcontractkit/chainlink-common/pkg/chains/label"
"github.com/smartcontractkit/chainlink-common/pkg/logger"
"github.com/smartcontractkit/chainlink-common/pkg/services"
"github.com/smartcontractkit/chainlink-framework/multinode"
feetypes "github.com/smartcontractkit/chainlink/v2/common/fee/types"
txmgrtypes "github.com/smartcontractkit/chainlink/v2/common/txmgr/types"
"github.com/smartcontractkit/chainlink/v2/common/types"
Expand Down
6 changes: 3 additions & 3 deletions core/chains/evm/client/chain_client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ func TestEthClient_SendTransactionReturnCode(t *testing.T) {

errType, err := ethClient.SendTransactionReturnCode(tests.Context(t), tx, fromAddress)
assert.Error(t, err)
assert.Equal(t, errType, multinode.Fatal)
assert.Equal(t, multinode.Fatal, errType)
})

t.Run("returns TransactionAlreadyKnown error type when error message is nonce too low", func(t *testing.T) {
Expand All @@ -517,7 +517,7 @@ func TestEthClient_SendTransactionReturnCode(t *testing.T) {

errType, err := ethClient.SendTransactionReturnCode(tests.Context(t), tx, fromAddress)
assert.Error(t, err)
assert.Equal(t, errType, multinode.TransactionAlreadyKnown)
assert.Equal(t, multinode.TransactionAlreadyKnown, errType)
})

t.Run("returns Successful error type when there is no error message", func(t *testing.T) {
Expand All @@ -542,7 +542,7 @@ func TestEthClient_SendTransactionReturnCode(t *testing.T) {

errType, err := ethClient.SendTransactionReturnCode(tests.Context(t), tx, fromAddress)
assert.NoError(t, err)
assert.Equal(t, errType, multinode.Successful)
assert.Equal(t, multinode.Successful, errType)
})

t.Run("returns Underpriced error type when transaction is terminally underpriced", func(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion core/chains/evm/client/evm_client.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package client

import (
"github.com/smartcontractkit/chainlink-framework/multinode"
"math/big"
"net/url"
"time"

"github.com/smartcontractkit/chainlink-common/pkg/logger"
"github.com/smartcontractkit/chainlink-framework/multinode"

evmconfig "github.com/smartcontractkit/chainlink/v2/core/chains/evm/config"
"github.com/smartcontractkit/chainlink/v2/core/chains/evm/config/chaintype"
Expand Down
2 changes: 1 addition & 1 deletion core/chains/evm/client/helpers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ func NewChainClientWithTestNode(
nodeCfg, mocks.ChainConfig{NoNewHeadsThresholdVal: noNewHeadsThreshold}, lggr, parsed, rpcHTTPURL, "eth-primary-node-0", id, chainID, 1, rpc, "EVM")
primaries := []multinode.Node[*big.Int, *RPCClient]{n}

var sendonlys []multinode.SendOnlyNode[*big.Int, *RPCClient]
sendonlys := make([]multinode.SendOnlyNode[*big.Int, *RPCClient], len(sendonlyRPCURLs))
for i, u := range sendonlyRPCURLs {
if u.Scheme != "http" && u.Scheme != "https" {
return nil, pkgerrors.Errorf("sendonly ethereum rpc url scheme must be http(s): %s", u.String())
Expand Down

0 comments on commit a604f35

Please sign in to comment.