Package org.hyperledger.fabric.sdk
Class SDKUtils
java.lang.Object
org.hyperledger.fabric.sdk.SDKUtils
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic byte[]calculateBlockHash(HFClient client, long blockNumber, byte[] previousHash, byte[] dataHash) used asn1 and get hashstatic Collection<Set<ProposalResponse>>getProposalConsistencySets(Collection<? extends ProposalResponse> proposalResponses, Set<ProposalResponse> invalid) Check that the proposals all have consistent read write setsstatic Collection<Set<ProposalResponse>>getProposalConsistencySets(Collection<ProposalResponse> proposalResponses) Check that the proposals all have consistent read write sets
-
Field Details
-
suite
public static org.hyperledger.fabric.sdk.security.CryptoSuite suite
-
-
Method Details
-
calculateBlockHash
public static byte[] calculateBlockHash(HFClient client, long blockNumber, byte[] previousHash, byte[] dataHash) throws IOException, InvalidArgumentException used asn1 and get hash- Parameters:
blockNumber-previousHash-dataHash-- Returns:
- byte[]
- Throws:
IOExceptionInvalidArgumentException
-
getProposalConsistencySets
public static Collection<Set<ProposalResponse>> getProposalConsistencySets(Collection<ProposalResponse> proposalResponses) throws InvalidArgumentException Check that the proposals all have consistent read write sets- Parameters:
proposalResponses-- Returns:
- A Collection of sets where each set has consistent proposals.
- Throws:
InvalidArgumentException
-
getProposalConsistencySets
public static Collection<Set<ProposalResponse>> getProposalConsistencySets(Collection<? extends ProposalResponse> proposalResponses, Set<ProposalResponse> invalid) throws InvalidArgumentException Check that the proposals all have consistent read write sets- Parameters:
proposalResponses-invalid- proposals that were found to be invalid.- Returns:
- A Collection of sets where each set has consistent proposals.
- Throws:
InvalidArgumentException
-