Search in sources :

Example 16 with HighQC

use of com.radixdlt.hotstuff.HighQC in project radixdlt by radixdlt.

the class PacemakerTest method setUp.

@Before
public void setUp() {
    HighQC highQC = mock(HighQC.class);
    QuorumCertificate committedQc = mock(QuorumCertificate.class);
    when(committedQc.getView()).thenReturn(View.of(0));
    when(highQC.highestCommittedQC()).thenReturn(committedQc);
    ViewUpdate initialViewUpdate = ViewUpdate.create(View.of(0), highQC, mock(BFTNode.class), mock(BFTNode.class));
    this.pacemaker = new Pacemaker(this.self, this.counters, this.validatorSet, this.vertexStore, this.safetyRules, this.timeoutDispatcher, this.timeoutSender, this.timeoutCalculator, this.nextTxnsGenerator, this.proposalDispatcher, this.voteDispatcher, hasher, timeSupplier, initialViewUpdate, new SystemCountersImpl());
}
Also used : HighQC(com.radixdlt.hotstuff.HighQC) ViewUpdate(com.radixdlt.hotstuff.bft.ViewUpdate) BFTNode(com.radixdlt.hotstuff.bft.BFTNode) QuorumCertificate(com.radixdlt.hotstuff.QuorumCertificate) SystemCountersImpl(com.radixdlt.counters.SystemCountersImpl) Before(org.junit.Before)

Aggregations

HighQC (com.radixdlt.hotstuff.HighQC)16 QuorumCertificate (com.radixdlt.hotstuff.QuorumCertificate)14 BFTNode (com.radixdlt.hotstuff.bft.BFTNode)11 View (com.radixdlt.hotstuff.bft.View)9 Test (org.junit.Test)9 ViewUpdate (com.radixdlt.hotstuff.bft.ViewUpdate)8 EventDispatcher (com.radixdlt.environment.EventDispatcher)6 LedgerHeader (com.radixdlt.hotstuff.LedgerHeader)6 Vote (com.radixdlt.hotstuff.Vote)6 Before (org.junit.Before)6 VerifiedVertex (com.radixdlt.hotstuff.bft.VerifiedVertex)5 TypedMocks.rmock (com.radixdlt.utils.TypedMocks.rmock)5 Mockito.times (org.mockito.Mockito.times)5 BFTHeader (com.radixdlt.hotstuff.BFTHeader)4 AbstractModule (com.google.inject.AbstractModule)3 Provides (com.google.inject.Provides)3 TypeLiteral (com.google.inject.TypeLiteral)3 Txn (com.radixdlt.atom.Txn)3 SystemCounters (com.radixdlt.counters.SystemCounters)3 Hasher (com.radixdlt.crypto.Hasher)3