Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FABN-1060: Handle error responses in comparison
Proposal responses returned from Channel.sendTransactionProposal() can be any of: ProposalResponse, Error, or Error augmented with response element of a ProposalResponse. Changing Channel.compareProposalResponseResults() so that it can handle any responses returned by Channel.sendTransactionProposal() without error. Where any of the responses are not good (i.e. instances of Error), compareProposalResponseResults() will return false, since they don't contain valid write sets. Similar change to Channel.verifyProposalResponse() to return false for error responses. If client code wants to compare only the successful proposal responses, they can do so with: const goodResponses = responses.filter((response) => !(response instanceof Error)); channel.compareProposalResponseResults(goodResponses); Change-Id: Id1af8b3c5a1cb51eb2f4e9b50897671634848a8a Signed-off-by: Mark S. Lewis <mark_lewis@uk.ibm.com>
- Loading branch information