You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When direct connection is connecting, it calls waitForPeers to check that call peers listening for db updates are subscribed to the corresponding pubsub direct channel topic.
However, waitForPeers never returns. It gets stuck waiting for peers because of this line:
e should be the address of the peer as a hash, eg. 0x1234567890, but it appears in newer versions of libp2p, the peer is represented by an object called Ed25519PeerIdImpl and so the above checks fail because object comparison is not possible. Ed25519PeerIdImpl, does, however, expose the peer id as a string if Ed25519PeerIdImpl is explicitly cast to the String object.
The proposed fix is to map the peersToWait AND the peers arrays to string versions of each peer, resulting in an array of peer address strings, E.g.
When direct connection is connecting, it calls
waitForPeers
to check that call peers listening for db updates are subscribed to the corresponding pubsub direct channel topic.However, waitForPeers never returns. It gets stuck waiting for peers because of this line:
e
should be the address of the peer as a hash, eg.0x1234567890
, but it appears in newer versions of libp2p, the peer is represented by an object called Ed25519PeerIdImpl and so the above checks fail because object comparison is not possible. Ed25519PeerIdImpl, does, however, expose the peer id as a string if Ed25519PeerIdImpl is explicitly cast to the String object.The proposed fix is to map the peersToWait AND the peers arrays to string versions of each peer, resulting in an array of peer address strings, E.g.
The text was updated successfully, but these errors were encountered: