Class SDKUtils



  • public class SDKUtils
    extends java.lang.Object
    • Method Detail

      • calculateBlockHash

        public static byte[] calculateBlockHash​(HFClient client,
                                                long blockNumber,
                                                byte[] previousHash,
                                                byte[] dataHash)
                                         throws java.io.IOException,
                                                InvalidArgumentException
        used asn1 and get hash
        Parameters:
        blockNumber -
        previousHash -
        dataHash -
        Returns:
        byte[]
        Throws:
        java.io.IOException
        InvalidArgumentException
      • getProposalConsistencySets

        public static java.util.Collection<java.util.Set<ProposalResponse>> getProposalConsistencySets​(java.util.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 java.util.Collection<java.util.Set<ProposalResponse>> getProposalConsistencySets​(java.util.Collection<ProposalResponse> proposalResponses,
                                                                                                       java.util.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