Is there a way to invoke setEndorsingPeers()
when calling contract.evaluateTransaction()
?
Is there any other way to achieve it?
The issue I am having is the following:
I am having two organizations and each of them has two peers: peer0 and peer1.
However, only the peers peer0 are endorsing peers. So, when querying the state, sometimes the transaction gets to the peers peer1 and an Error
is thrown.
I've found a workaround at Querying chaincode is only successful in ~3/5 cases with nodejs, but it requires me to promote all the peers to endorsing peers.
Is my approach with just committing peers even valid and correct?
Thank you in advance.
P.S. No one is responding on the other thread and I believe this is a valid separate issue whose solution is not that workaround.