Skip to content

Commit

Permalink
update go-ipfs-config to v0.17.0, fix sharness
Browse files Browse the repository at this point in the history
  • Loading branch information
marten-seemann committed Nov 17, 2021
1 parent 5358b0d commit b526b28
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 6 deletions.
11 changes: 10 additions & 1 deletion core/node/groups.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,15 @@ func LibP2P(bcfg *BuildCfg, cfg *config.Config) fx.Option {
logger.Error("Use the 'Swarm.Transports.Network.Relay' config field instead")
}
}
//nolint
if cfg.Swarm.EnableAutoRelay {
logger.Error("The 'Swarm.EnableAutoRelay' config field is deprecated.")
if cfg.Swarm.RelayClient.Enabled == config.Default {
logger.Error("Use the 'Swarm.AutoRelay.Enabled' config field instead")
} else {
logger.Error("'Swarm.EnableAutoRelay' has been overridden by 'Swarm.AutoRelay.Enabled'")
}
}

// Gather all the options
opts := fx.Options(
Expand All @@ -145,7 +154,7 @@ func LibP2P(bcfg *BuildCfg, cfg *config.Config) fx.Option {

maybeProvide(libp2p.BandwidthCounter, !cfg.Swarm.DisableBandwidthMetrics),
maybeProvide(libp2p.NatPortMap, !cfg.Swarm.DisableNatPortMap),
maybeProvide(libp2p.AutoRelay(len(cfg.Swarm.RelayClient.StaticRelays) == 0), cfg.Swarm.EnableAutoRelay),
maybeProvide(libp2p.AutoRelay(len(cfg.Swarm.RelayClient.StaticRelays) == 0), cfg.Swarm.RelayClient.Enabled.WithDefault(false)),
autonat,
connmgr,
ps,
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ require (
github.com/ipfs/go-ipfs-blockstore v1.0.5-0.20211014014401-70aaaef6f401
github.com/ipfs/go-ipfs-chunker v0.0.5
github.com/ipfs/go-ipfs-cmds v0.6.0
github.com/ipfs/go-ipfs-config v0.16.1-0.20211116105546-44a3bfa7e9d3
github.com/ipfs/go-ipfs-config v0.17.0
github.com/ipfs/go-ipfs-exchange-interface v0.1.0
github.com/ipfs/go-ipfs-exchange-offline v0.1.0
github.com/ipfs/go-ipfs-files v0.0.9
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -470,8 +470,8 @@ github.com/ipfs/go-ipfs-chunker v0.0.5 h1:ojCf7HV/m+uS2vhUGWcogIIxiO5ubl5O57Q7Na
github.com/ipfs/go-ipfs-chunker v0.0.5/go.mod h1:jhgdF8vxRHycr00k13FM8Y0E+6BoalYeobXmUyTreP8=
github.com/ipfs/go-ipfs-cmds v0.6.0 h1:yAxdowQZzoFKjcLI08sXVNnqVj3jnABbf9smrPQmBsw=
github.com/ipfs/go-ipfs-cmds v0.6.0/go.mod h1:ZgYiWVnCk43ChwoH8hAmI1IRbuVtq3GSTHwtRB/Kqhk=
github.com/ipfs/go-ipfs-config v0.16.1-0.20211116105546-44a3bfa7e9d3 h1:RrQSZ0kQrUOQOLX/rNCawRYkII3zPW30mZ74N1xcMAE=
github.com/ipfs/go-ipfs-config v0.16.1-0.20211116105546-44a3bfa7e9d3/go.mod h1:wz2lKzOjgJeYJa6zx8W9VT7mz+iSd0laBMqS/9wmX6A=
github.com/ipfs/go-ipfs-config v0.17.0 h1:k7f15Krq/j1CPl/+McyI5B2uS6UH5piETMadOzc4QOM=
github.com/ipfs/go-ipfs-config v0.17.0/go.mod h1:wz2lKzOjgJeYJa6zx8W9VT7mz+iSd0laBMqS/9wmX6A=
github.com/ipfs/go-ipfs-delay v0.0.0-20181109222059-70721b86a9a8/go.mod h1:8SP1YXK1M1kXuc4KJZINY3TQQ03J2rwBG9QfXmbRPrw=
github.com/ipfs/go-ipfs-delay v0.0.1 h1:r/UXYyRcddO6thwOnhiznIAiSvxMECGgtv35Xs1IeRQ=
github.com/ipfs/go-ipfs-delay v0.0.1/go.mod h1:8SP1YXK1M1kXuc4KJZINY3TQQ03J2rwBG9QfXmbRPrw=
Expand Down
4 changes: 2 additions & 2 deletions test/sharness/t0182-circuit-relay.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ staticrelay=$(ipfsi 1 swarm addrs local | sed -e "s|$|/p2p/$PEERID_1|g" | jq --r

test_expect_success 'configure the relay node as a static relay for node A' '
ipfsi 0 config Internal.Libp2pForceReachability private &&
ipfsi 0 config --json Swarm.EnableAutoRelay true &&
ipfsi 0 config --json Swarm.StaticRelays "$staticrelay"
ipfsi 0 config --json Swarm.RelayClient.Enabled true &&
ipfsi 0 config --json Swarm.RelayClient.StaticRelays "$staticrelay"
'

test_expect_success 'configure the relay node' '
Expand Down

0 comments on commit b526b28

Please sign in to comment.