Search in sources :

Example 6 with DtoLedgerProof

use of com.radixdlt.ledger.DtoLedgerProof in project radixdlt by radixdlt.

the class RemoteSyncServiceTest method when_remote_sync_request_and_null_return__then_dont_do_anything.

@Test
public void when_remote_sync_request_and_null_return__then_dont_do_anything() {
    DtoLedgerProof header = mock(DtoLedgerProof.class);
    when(header.getOpaque()).thenReturn(HashUtils.zero256());
    when(header.getLedgerHeader()).thenReturn(mock(LedgerHeader.class));
    when(header.getSignatures()).thenReturn(mock(TimestampedECDSASignatures.class));
    processor.syncRequestEventProcessor().process(BFTNode.random(), SyncRequest.create(header));
    when(reader.getNextCommittedTxns(any())).thenReturn(null);
    verify(syncResponseDispatcher, never()).dispatch(any(BFTNode.class), any());
}
Also used : TimestampedECDSASignatures(com.radixdlt.hotstuff.TimestampedECDSASignatures) DtoLedgerProof(com.radixdlt.ledger.DtoLedgerProof) LedgerHeader(com.radixdlt.hotstuff.LedgerHeader) BFTNode(com.radixdlt.hotstuff.bft.BFTNode) Test(org.junit.Test)

Aggregations

DtoLedgerProof (com.radixdlt.ledger.DtoLedgerProof)6 TimestampedECDSASignatures (com.radixdlt.hotstuff.TimestampedECDSASignatures)4 Test (org.junit.Test)4 LedgerHeader (com.radixdlt.hotstuff.LedgerHeader)3 BFTNode (com.radixdlt.hotstuff.bft.BFTNode)3 LedgerProof (com.radixdlt.hotstuff.LedgerProof)2 SyncRequest (com.radixdlt.sync.messages.remote.SyncRequest)2 Txn (com.radixdlt.atom.Txn)1 REProcessedTxn (com.radixdlt.constraintmachine.REProcessedTxn)1 RemoteEvent (com.radixdlt.environment.rx.RemoteEvent)1 BFTValidatorSet (com.radixdlt.hotstuff.bft.BFTValidatorSet)1 DtoTxnsAndProof (com.radixdlt.ledger.DtoTxnsAndProof)1 VerifiedTxnsAndProof (com.radixdlt.ledger.VerifiedTxnsAndProof)1 Transaction (com.sleepycat.je.Transaction)1 IOException (java.io.IOException)1 Before (org.junit.Before)1