refactor: use peerInfo and multiaddresses instead of peerID #1269
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Required by status-im/status-go#5946
The interaction with libwaku is done thru multiaddresses instead of peerID, because the peerstore is not exposed like we do in go-waku. So, to make it possible to use both go-waku and nwaku in status-go (depending on a build flag), changes are done both in go-waku and the
apipackage to use multiaddresses and/or peer.AddrInfo where needed.It's worth mentioning that the cases in which a
peer.AddrInfoare those in which a node can have more than one multiaddress (like the storenodes), and in these cases thepeer.AddrInfowill be translated into a comma separated string containing all the multiaddresses like it is done here: https://github.com/status-im/status-go/blob/1348510acfdfd93dbe5fc5b0a23e9caf532272a3/wakuv2/nwaku.go#L2904-L2910This PR should not be merged until status-im/status-go#5946 is ready to be merged
cc: @Ivansete-status @gabrielmer