use of org.hyperledger.fabric.protos.ledger.rwset.Rwset.TxReadWriteSet in project fabric-sdk-java by hyperledger.
the class ProposalResponse method getChaincodeActionResponseReadWriteSetInfo.
/**
* getChaincodeActionResponseReadWriteSetInfo get this proposals read write set.
*
* @return The read write set. See {@link TxReadWriteSetInfo}
* @throws InvalidArgumentException
*/
public TxReadWriteSetInfo getChaincodeActionResponseReadWriteSetInfo() throws InvalidArgumentException {
if (isInvalid()) {
throw new InvalidArgumentException("Proposal response is invalid.");
}
try {
final ProposalResponsePayloadDeserializer proposalResponsePayloadDeserializer = getProposalResponsePayloadDeserializer();
TxReadWriteSet txReadWriteSet = proposalResponsePayloadDeserializer.getExtension().getResults();
if (txReadWriteSet == null) {
return null;
}
return new TxReadWriteSetInfo(txReadWriteSet);
} catch (Exception e) {
throw new InvalidArgumentException(e);
}
}
Aggregations