When no explicit provider addr is configured listen to local address changes and use the latest
masih opened this issue · comments
Masih H. Derkani commented
The provider engine allows a user to explicitly set provider addrs in 2 ways:
- as option to engine, and
- as argument passed to
NotifyPut
When no such setting exists, it uses the given libp2p host addrs by caching the host addrs in options.
This means when the libp2p local addrs change, engine will not reflect the changes.
Instead, when no explicit provider addr is given the engine should listen to libp2p eventbus for local address changes and use the latest addrs in subsequent advertisements. Specifically, the event it should listen to is EvtLocalAddressesUpdated
.