Skip to content

Commit

Permalink
Merge pull request #5920 from mysteriumnetwork/bump-go-ethereum
Browse files Browse the repository at this point in the history
Bump dependencies
  • Loading branch information
Guillembonet authored Nov 15, 2023
2 parents 86fd523 + 3dbe25b commit c81cf61
Show file tree
Hide file tree
Showing 6 changed files with 540 additions and 706 deletions.
6 changes: 5 additions & 1 deletion config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,11 @@ func (cfg *Config) ParseStringFlag(ctx *cli.Context, flag cli.StringFlag) {
// ParseStringSliceFlag parses a cli.StringSliceFlag from command's context and
// sets default and CLI values to the application configuration.
func (cfg *Config) ParseStringSliceFlag(ctx *cli.Context, flag cli.StringSliceFlag) {
cfg.SetDefault(flag.Name, flag.Value.Value())
var value []string = nil
if flag.Value != nil {
value = flag.Value.Value()
}
cfg.SetDefault(flag.Name, value)
if ctx.IsSet(flag.Name) {
cfg.SetCLI(flag.Name, ctx.StringSlice(flag.Name))
} else {
Expand Down
7 changes: 4 additions & 3 deletions core/discovery/dhtdiscovery/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ import (
"fmt"

"github.com/libp2p/go-libp2p"
"github.com/libp2p/go-libp2p-core/host"
"github.com/libp2p/go-libp2p-core/peer"
"github.com/libp2p/go-libp2p/core/host"
"github.com/libp2p/go-libp2p/core/peer"
"github.com/multiformats/go-multiaddr"
"github.com/rs/zerolog/log"
)
Expand Down Expand Up @@ -78,7 +78,7 @@ func (n *Node) Start() (err error) {
n.libP2PNodeCtx, n.libP2PNodeCancel = context.WithCancel(context.Background())

// Start libp2p node.
n.libP2PNode, err = n.libP2PConfig.NewNode(n.libP2PNodeCtx)
n.libP2PNode, err = n.libP2PConfig.NewNode()
if err != nil {
return fmt.Errorf("failed to start DHT node: %w", err)
}
Expand All @@ -96,6 +96,7 @@ func (n *Node) Start() (err error) {
// Stop stops DHT node.
func (n *Node) Stop() {
n.libP2PNodeCancel()
n.libP2PNode.Close()
}

func (n *Node) connectToPeer(peerInfo peer.AddrInfo) {
Expand Down
Loading

0 comments on commit c81cf61

Please sign in to comment.