Skip to content

Commit

Permalink
feat:Replace outdated dependencies and adjust the order of guide pack…
Browse files Browse the repository at this point in the history
…ets (#4)
  • Loading branch information
MagicalBridge authored Jan 23, 2025
1 parent b077f98 commit 8b4944a
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 18 deletions.
6 changes: 2 additions & 4 deletions cmd/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ import (
"encoding/hex"
"errors"
"fmt"
"io/ioutil"
"os"

"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/params"
"github.com/urfave/cli/v2"

"github.com/Manta-Network/manta-fp-aggregator/common/cliapp"
"github.com/Manta-Network/manta-fp-aggregator/config"
Expand All @@ -21,8 +21,6 @@ import (
"github.com/Manta-Network/manta-fp-aggregator/sign"
"github.com/Manta-Network/manta-fp-aggregator/store"
"github.com/Manta-Network/manta-fp-aggregator/ws/server"

"github.com/urfave/cli/v2"
)

var (
Expand Down Expand Up @@ -122,7 +120,7 @@ func runNode(ctx *cli.Context, shutdown context.CancelCauseFunc) (cliapp.Lifecyc
privKeyPath := cfg.Node.KeyPath + "/" + DefaultPrivKeyFilename
pubKeyPath := cfg.Node.KeyPath + "/" + DefaultPubKeyFilename
if _, err := os.Stat(privKeyPath); err == nil {
privKeyData, err := ioutil.ReadFile(privKeyPath)
privKeyData, err := os.ReadFile(privKeyPath)
if err != nil {
return nil, err
}
Expand Down
1 change: 0 additions & 1 deletion cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ var (
)

func main() {

log.SetDefault(log.NewLogger(log.NewTerminalHandlerWithLevel(os.Stderr, log.LevelInfo, true)))
app := newCli(GitCommit, GitDate)
if err := app.RunContext(context.Background(), os.Args); err != nil {
Expand Down
4 changes: 2 additions & 2 deletions common/cliapp/lifecycle.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (
"fmt"
"os"

"github.com/Manta-Network/manta-fp-aggregator/common/opio"

"github.com/urfave/cli/v2"

"github.com/Manta-Network/manta-fp-aggregator/common/opio"
)

type Lifecycle interface {
Expand Down
4 changes: 2 additions & 2 deletions config/config.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package config

import (
"io/ioutil"
"os"
"time"

"gopkg.in/yaml.v2"
Expand Down Expand Up @@ -66,7 +66,7 @@ func DefaultConfiguration() *Config {

func NewConfig(path string) (*Config, error) {
var config = new(Config)
data, err := ioutil.ReadFile(path)
data, err := os.ReadFile(path)
if err != nil {
return nil, err
}
Expand Down
7 changes: 3 additions & 4 deletions manager/router/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,12 @@ import (
"net/http"

"github.com/ethereum/go-ethereum/log"

"github.com/Manta-Network/manta-fp-aggregator/manager/types"
"github.com/Manta-Network/manta-fp-aggregator/store"

"github.com/gin-gonic/gin"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promhttp"

"github.com/Manta-Network/manta-fp-aggregator/manager/types"
"github.com/Manta-Network/manta-fp-aggregator/store"
)

type Registry struct {
Expand Down
6 changes: 3 additions & 3 deletions manager/sign.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ import (
"sync"
"time"

tmjson "github.com/tendermint/tendermint/libs/json"
tmtypes "github.com/tendermint/tendermint/rpc/jsonrpc/types"

"github.com/Manta-Network/manta-fp-aggregator/manager/types"
"github.com/Manta-Network/manta-fp-aggregator/node/common"
"github.com/Manta-Network/manta-fp-aggregator/sign"
"github.com/Manta-Network/manta-fp-aggregator/ws/server"

tmjson "github.com/tendermint/tendermint/libs/json"
tmtypes "github.com/tendermint/tendermint/rpc/jsonrpc/types"
)

func (m *Manager) sign(ctx types.Context, request interface{}, method types.Method) (types.SignResult, error) {
Expand Down
4 changes: 2 additions & 2 deletions node/deal_msg.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import (
"errors"
"fmt"

"github.com/Manta-Network/manta-fp-aggregator/manager/types"

tdtypes "github.com/tendermint/tendermint/rpc/jsonrpc/types"
tmtypes "github.com/tendermint/tendermint/rpc/jsonrpc/types"

"github.com/Manta-Network/manta-fp-aggregator/manager/types"
)

func (n *Node) ProcessMessage() {
Expand Down

0 comments on commit 8b4944a

Please sign in to comment.