use of com.hedera.mirror.common.domain.transaction.RecordFile in project hedera-mirror-node by hashgraph.
the class TestRecordFiles method getV2V5Files.
public List<RecordFile> getV2V5Files() {
EntityId nodeAccountId = EntityId.of(0, 0, 3, EntityType.ACCOUNT);
RecordFile recordFileV2 = RecordFile.builder().consensusStart(1611188151568507001L).consensusEnd(1611188151568507001L).count(1L).digestAlgorithm(DigestAlgorithm.SHA384).fileHash("e7d9e71efd239bde3adcad8eb0571c38f91f77ae76a4af69bb44f19b2785ad3594ac1d265351a592ab14301da9bb1950").hash("e7d9e71efd239bde3adcad8eb0571c38f91f77ae76a4af69bb44f19b2785ad3594ac1d265351a592ab14301da9bb1950").name("2021-01-21T00_15_51.568507001Z.rcd").nodeAccountId(nodeAccountId).previousHash("d27ba83c736bfa2ffc9a6f062b27ea4856800bbbe820b77b32e08faf3d7475d81ef5a16f90ce065d35eefa999677edaa").version(2).build();
RecordFile recordFileV5 = RecordFile.builder().consensusStart(1611188383558496000L).consensusEnd(1611188383558496000L).count(1L).digestAlgorithm(DigestAlgorithm.SHA384).fileHash("42717bae0e538bac34563784b08b5a5b50a9964c9435452c93134bf13355c9778a1c64cfdc30f33fe52dd7f76dbdda70").hapiVersionMajor(0).hapiVersionMinor(11).hapiVersionPatch(0).hash("e6c1d7bfe956b6b2c8061bee5c43e512111cbccb21099bb0c49e2a7c74cf617cf5b6bf65070f29eb43a80d9cef2d8242").metadataHash("1d83206a166a06c8579f9de637cf50a565341928b55bfbdc774ce85ac2169b46c23db42729723e7c39e5a042bd9e3b98").name("2021-01-21T00_19_43.558496000Z.rcd").nodeAccountId(nodeAccountId).previousHash(recordFileV2.getHash()).version(5).build();
return List.of(recordFileV2, recordFileV5);
}
use of com.hedera.mirror.common.domain.transaction.RecordFile in project hedera-mirror-node by hashgraph.
the class ContractResultServiceImplIntegrationTest method parseRecordItemAndCommit.
protected void parseRecordItemAndCommit(RecordItem recordItem, Transaction transaction) {
transactionTemplate.executeWithoutResult(status -> {
Instant instant = Instant.ofEpochSecond(0, recordItem.getConsensusTimestamp());
String filename = StreamFilename.getFilename(StreamType.RECORD, DATA, instant);
long consensusStart = recordItem.getConsensusTimestamp();
RecordFile recordFile = domainBuilder.recordFile().customize(x -> x.consensusStart(consensusStart).consensusEnd(consensusStart + 1).name(filename)).get();
recordStreamFileListener.onStart();
contractResultService.process(recordItem, transaction);
// commit, close connection
recordStreamFileListener.onEnd(recordFile);
});
}
use of com.hedera.mirror.common.domain.transaction.RecordFile in project hedera-mirror-node by hashgraph.
the class RecordFileV2DownloaderTest method getRecordFileMap.
@Override
protected Map<String, RecordFile> getRecordFileMap() {
Map<String, RecordFile> allRecordFileMap = TestRecordFiles.getAll();
RecordFile recordFile1 = allRecordFileMap.get("2019-08-30T18_10_00.419072Z.rcd");
RecordFile recordFile2 = allRecordFileMap.get("2019-08-30T18_10_05.249678Z.rcd");
return Map.of(recordFile1.getName(), recordFile1, recordFile2.getName(), recordFile2);
}
use of com.hedera.mirror.common.domain.transaction.RecordFile in project hedera-mirror-node by hashgraph.
the class RecordFileV2V5DownloaderTest method getRecordFileMap.
@Override
protected Map<String, RecordFile> getRecordFileMap() {
List<RecordFile> recordFiles = TestRecordFiles.getV2V5Files();
RecordFile recordFileV2 = recordFiles.get(0);
RecordFile recordFileV5 = recordFiles.get(1);
return Map.of(recordFileV2.getName(), recordFileV2, recordFileV5.getName(), recordFileV5);
}
use of com.hedera.mirror.common.domain.transaction.RecordFile in project hedera-mirror-node by hashgraph.
the class RecordFileRepositoryTest method findLatestIndex.
@Test
void findLatestIndex() {
RecordFile recordFile1 = recordFile();
recordFileRepository.save(recordFile1);
RecordFile recordFile2 = recordFile();
recordFileRepository.save(recordFile2);
assertThat(recordFileRepository.findLatestIndex()).get().isEqualTo(recordFile2.getIndex());
}
Aggregations