Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
0xnogo committed Oct 16, 2024
1 parent 87f5dd4 commit 8afea0c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"encoding/hex"
"encoding/json"
"fmt"
"math"
"math/big"
"sort"
"testing"
Expand Down Expand Up @@ -418,18 +417,16 @@ func GenerateExpectedRMNHomeNodesInfo(staticConfig rmn_home.RMNHomeStaticConfig,

supportedCandidateSourceChains := mapset.NewSet(cciptypes.ChainSelector(chainID))

for i, n := range staticConfig.Nodes {
if i < 0 || i > math.MaxUint32 {
panic(fmt.Errorf("i is out of range for uint32: %d", i))
}
nodeID := ccipreader.NodeID(i)
var counter uint32
for _, n := range staticConfig.Nodes {
pk := ed25519.PublicKey(n.OffchainPublicKey[:])
expectedCandidateNodesInfo = append(expectedCandidateNodesInfo, ccipreader.HomeNodeInfo{
ID: nodeID,
ID: ccipreader.NodeID(counter),
PeerID: n.PeerId,
SupportedSourceChains: supportedCandidateSourceChains,
OffchainPublicKey: &pk,
})
counter++
}
return expectedCandidateNodesInfo
}
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ func TestRMNHomeReader_GetRMNNodesInfo(t *testing.T) {
require.NoError(t, err)

t.Cleanup(func() {
err := rmnHomeReader.Close()
require.NoError(t, err)
err1 := rmnHomeReader.Close()
require.NoError(t, err1)
})

//================================Test RMNHome Reader===============================
Expand Down

0 comments on commit 8afea0c

Please sign in to comment.