@Test public void finalCommitmentHashTest() { byte [] data = Utils.HEX.decode("010002f2ef5ab062b348bfcf9f5be4c07b817e176a5726fa9b799ad67f690700000000fd9001bf7fffaffedffef77fef7ffffffcbdffaffffffffffffdfffff7f7f7fff7ffefbfffffdff1fdbf7feffcffbb1f0000000000fd9001bf7fffaffedffef77fef7ffffffcbfffaffffffffffffdfffff7f7f7fff7ffefbfffffdff1fdbf7feffcffbb1f000000000003a3fbbe99d80a9be8fc59fd4fe43dfbeba9119b688e97493664716cdf15ae47fad70fea7cb93f20fba10d689f9e3c02a2263a396ef747508bf75a2dd7f891abb0fc4fb58b6773d131eb0403126bdebe9944c544e03a478b401b65cabbb24338872613f7d58ff13ab038ab86418ec70ef1734ff43e965ccb83e02da83b10d44c0f23c630752cfb29b402149a1fc3fad0760e6341a4a1031efad2983c8637d2a461e9bcaf935b7a4dfa225ed2f7771c7592eda5c13583577719bea9337b4b9b6286ac11a072de0955b0dc5a012280bb557a53f9643cee7730dabe2d3a4a19042813ef5d39ae92d0015554954011c1e12bc688d4d7672ac33c4001e0dedbfe5d0316f2ad23206d478964ca62d75f50e4d0"); FinalCommitment commitment = new FinalCommitment(PARAMS, data, 0); Sha256Hash commitmentHash = commitment.getHash(); assertEquals(Sha256Hash.wrap("082f5e29385f81704ef63c886aa20c2f8d69efd87d3937d6769285e2ead9ea0f"), commitmentHash); }
public Sha256Hash getHash() { try { UnsafeByteArrayOutputStream bos = new UnsafeByteArrayOutputStream(getMessageSize()); bitcoinSerializeToStream(bos); return Sha256Hash.wrapReversed(Sha256Hash.hashTwice(bos.toByteArray())); } catch (IOException x) { throw new RuntimeException(x); } }
FinalCommitment extends SpecialTxPayload { public Sha256Hash getHash() { try { UnsafeByteArrayOutputStream bos = new UnsafeByteArrayOutputStream(getMessageSize()); bitcoinSerializeToStream(bos); return Sha256Hash.wrapReversed(Sha256Hash.hashTwice(bos.toByteArray())); } catch (IOException x) { throw new RuntimeException(x); } } }
FinalCommitment extends SpecialTxPayload { public Sha256Hash getHash() { try { UnsafeByteArrayOutputStream bos = new UnsafeByteArrayOutputStream(getMessageSize()); bitcoinSerializeToStream(bos); return Sha256Hash.wrapReversed(Sha256Hash.hashTwice(bos.toByteArray())); } catch (IOException x) { throw new RuntimeException(x); } } FinalCommitment(NetworkParameters params, byte [] payload, int offset);  FinalCommitment(NetworkParameters params, LLMQParameters llmqParameters, Sha256Hash quorumHash);  FinalCommitment(NetworkParameters params, Transaction tx); }
FinalCommitment extends SpecialTxPayload { public Sha256Hash getHash() { try { UnsafeByteArrayOutputStream bos = new UnsafeByteArrayOutputStream(getMessageSize()); bitcoinSerializeToStream(bos); return Sha256Hash.wrapReversed(Sha256Hash.hashTwice(bos.toByteArray())); } catch (IOException x) { throw new RuntimeException(x); } } FinalCommitment(NetworkParameters params, byte [] payload, int offset);  FinalCommitment(NetworkParameters params, LLMQParameters llmqParameters, Sha256Hash quorumHash);  FinalCommitment(NetworkParameters params, Transaction tx); int getCurrentVersion(); String toString(); @Override Transaction.Type getType(); @Override String getName(); @Override JSONObject toJson(); int countSigners(); int countValidMembers(); boolean verify(ArrayList<Masternode> members, boolean checkSigs); boolean isNull(); boolean verifyNull(); boolean verifySizes(LLMQParameters llmqParameters); Sha256Hash getHash(); Sha256Hash getQuorumHash(); int getLlmqType(); BLSPublicKey getQuorumPublicKey(); Sha256Hash getQuorumVvecHash(); BLSSignature getMembersSignature(); BLSSignature getQuorumSignature(); ArrayList<Boolean> getSigners(); ArrayList<Boolean> getValidMembers(); }
FinalCommitment extends SpecialTxPayload { public Sha256Hash getHash() { try { UnsafeByteArrayOutputStream bos = new UnsafeByteArrayOutputStream(getMessageSize()); bitcoinSerializeToStream(bos); return Sha256Hash.wrapReversed(Sha256Hash.hashTwice(bos.toByteArray())); } catch (IOException x) { throw new RuntimeException(x); } } FinalCommitment(NetworkParameters params, byte [] payload, int offset);  FinalCommitment(NetworkParameters params, LLMQParameters llmqParameters, Sha256Hash quorumHash);  FinalCommitment(NetworkParameters params, Transaction tx); int getCurrentVersion(); String toString(); @Override Transaction.Type getType(); @Override String getName(); @Override JSONObject toJson(); int countSigners(); int countValidMembers(); boolean verify(ArrayList<Masternode> members, boolean checkSigs); boolean isNull(); boolean verifyNull(); boolean verifySizes(LLMQParameters llmqParameters); Sha256Hash getHash(); Sha256Hash getQuorumHash(); int getLlmqType(); BLSPublicKey getQuorumPublicKey(); Sha256Hash getQuorumVvecHash(); BLSSignature getMembersSignature(); BLSSignature getQuorumSignature(); ArrayList<Boolean> getSigners(); ArrayList<Boolean> getValidMembers(); static final int CURRENT_VERSION; }