Search in sources :

Example 6 with EventFile

use of com.hedera.mirror.common.domain.event.EventFile in project hedera-mirror-node by hashgraph.

the class EventFileRepositoryTest method eventFile.

private EventFile eventFile() {
    long id = ++count;
    EventFile eventFile = new EventFile();
    eventFile.setConsensusStart(id);
    eventFile.setConsensusEnd(id);
    eventFile.setCount(id);
    eventFile.setDigestAlgorithm(DigestAlgorithm.SHA384);
    eventFile.setFileHash("fileHash" + id);
    eventFile.setHash("fileHash" + id);
    eventFile.setLoadEnd(id);
    eventFile.setLoadStart(id);
    eventFile.setName(id + ".evt");
    eventFile.setNodeAccountId(EntityId.of("0.0.3", EntityType.ACCOUNT));
    eventFile.setPreviousHash("fileHash" + id);
    return eventFile;
}
Also used : EventFile(com.hedera.mirror.common.domain.event.EventFile)

Aggregations

EventFile (com.hedera.mirror.common.domain.event.EventFile)6 Test (org.junit.jupiter.api.Test)3 StreamFileData (com.hedera.mirror.importer.domain.StreamFileData)2 Stopwatch (com.google.common.base.Stopwatch)1 EventItem (com.hedera.mirror.common.domain.event.EventItem)1 InvalidEventFileException (com.hedera.mirror.importer.exception.InvalidEventFileException)1 DataInputStream (java.io.DataInputStream)1 MessageDigest (java.security.MessageDigest)1 Instant (java.time.Instant)1