0

I have a network of 12 peers (6 orgs each one has 2 peers) but once I'm trying to retrieve all channel peers in node js app by using channel.getpeers() only it returns 2 orgs peers and I have to manually add the rest then send the proposal through all to sign.

I have checked all peers inside the cli and I saw all of them join the channel properly, do you have any idea why this method only returns 4 peers?

Harshit
  • 886
  • 7
  • 18
Plato
  • 16
  • 4

1 Answers1

1

I've encountered the same issue recently, It seems to be the way the dynamic discovery behaves, I read through github code and found that they themselves use a method to retry query until function returns expected number of peers using DefaultRetryableCodes .

If you use go sdk the function can be found here. The same logic can be replicated by changing the to whatever requirement you have with the peers.

Captain Levi
  • 804
  • 7
  • 18