config: supply the host ID to fx

This is needed to construct the insecure transport.
This commit is contained in:
Marten Seemann 2022-11-16 17:17:26 +13:00
parent 090a084aea
commit 133f002117
1 changed files with 1 additions and 0 deletions

View File

@ -182,6 +182,7 @@ func (cfg *Config) addTransports(h host.Host) error {
fx.ParamTags(`group:"security"`),
)),
fx.Supply(cfg.Muxers),
fx.Supply(h.ID()),
fx.Provide(func() host.Host { return h }),
fx.Provide(func() crypto.PrivKey { return h.Peerstore().PrivKey(h.ID()) }),
fx.Provide(func() connmgr.ConnectionGater { return cfg.ConnectionGater }),