use of com.radixdlt.hotstuff.VoteData in project radixdlt by radixdlt.
the class VerifiedVertexStoreStateCreationTest method creating_vertex_store_with_qc_not_matching_vertex_should_fail.
@Test
public void creating_vertex_store_with_qc_not_matching_vertex_should_fail() {
BFTHeader genesisHeader = new BFTHeader(View.of(0), HashUtils.random256(), mock(LedgerHeader.class));
VoteData voteData = new VoteData(genesisHeader, genesisHeader, genesisHeader);
QuorumCertificate badRootQC = new QuorumCertificate(voteData, new TimestampedECDSASignatures());
assertThatThrownBy(() -> VerifiedVertexStoreState.create(HighQC.from(badRootQC), genesisVertex, Optional.empty(), hasher)).isInstanceOf(IllegalStateException.class);
}
use of com.radixdlt.hotstuff.VoteData in project radixdlt by radixdlt.
the class DifferentTimestampsCauseTimeoutTest method mutateQC.
private QuorumCertificate mutateQC(QuorumCertificate qc, int destination) {
TimestampedECDSASignatures signatures = qc.getTimestampedSignatures();
VoteData voteData = qc.getVoteData();
return new QuorumCertificate(voteData, mutateTimestampedSignatures(signatures, destination));
}
Aggregations