@@ -112,10 +112,10 @@ func LibP2P(bcfg *BuildCfg, cfg *config.Config) fx.Option {
112
112
}
113
113
114
114
// If `cfg.Swarm.DisableRelay` is set and `Network.RelayTransport` isn't, use the former.
115
- enableRelayTransport := cfg .Swarm .Transports .Network .Relay .WithDefault (! cfg .Swarm .DisableRelay ) //nolint
115
+ enableRelayTransport := cfg .Swarm .Transports .Network .Relay .WithDefault (! cfg .Swarm .DisableRelay ) // nolint
116
116
117
117
// Warn about a deprecated option.
118
- //nolint
118
+ // nolint
119
119
if cfg .Swarm .DisableRelay {
120
120
logger .Error ("The 'Swarm.DisableRelay' config field is deprecated." )
121
121
if enableRelayTransport {
@@ -124,7 +124,7 @@ func LibP2P(bcfg *BuildCfg, cfg *config.Config) fx.Option {
124
124
logger .Error ("Use the 'Swarm.Transports.Network.Relay' config field instead" )
125
125
}
126
126
}
127
- //nolint
127
+ // nolint
128
128
if cfg .Swarm .EnableAutoRelay {
129
129
logger .Error ("The 'Swarm.EnableAutoRelay' config field is deprecated." )
130
130
if cfg .Swarm .RelayClient .Enabled == config .Default {
@@ -133,7 +133,7 @@ func LibP2P(bcfg *BuildCfg, cfg *config.Config) fx.Option {
133
133
logger .Error ("'Swarm.EnableAutoRelay' has been overridden by 'Swarm.AutoRelay.Enabled'" )
134
134
}
135
135
}
136
- //nolint
136
+ // nolint
137
137
if cfg .Swarm .EnableRelayHop {
138
138
logger .Fatal ("The `Swarm.EnableRelayHop` config field is ignored.\n " +
139
139
"Use `Swarm.RelayService` to configure the circuit v2 relay.\n " +
@@ -144,6 +144,7 @@ func LibP2P(bcfg *BuildCfg, cfg *config.Config) fx.Option {
144
144
opts := fx .Options (
145
145
BaseLibP2P ,
146
146
147
+ fx .Provide (libp2p .ResourceManager ()),
147
148
fx .Provide (libp2p .AddrFilters (cfg .Swarm .AddrFilters )),
148
149
fx .Provide (libp2p .AddrsFactory (cfg .Addresses .Announce , cfg .Addresses .AppendAnnounce , cfg .Addresses .NoAnnounce )),
149
150
fx .Provide (libp2p .SmuxTransport (cfg .Swarm .Transports )),
0 commit comments