Search in sources :

Example 1 with CryptoDeleteLiveHashTransactionBody

use of com.hederahashgraph.api.proto.java.CryptoDeleteLiveHashTransactionBody in project hedera-mirror-node by hashgraph.

the class EntityRecordItemListenerCryptoTest method cryptoDeleteLiveHash.

@Test
void cryptoDeleteLiveHash() {
    Transaction transactionAddLiveHash = cryptoAddLiveHashTransaction();
    parseRecordItemAndCommit(new RecordItem(transactionAddLiveHash, transactionRecordSuccess(getTransactionBody(transactionAddLiveHash))));
    // now delete the live hash
    Transaction transaction = cryptoDeleteLiveHashTransaction();
    TransactionBody transactionBody = getTransactionBody(transaction);
    CryptoDeleteLiveHashTransactionBody deleteLiveHashTransactionBody = transactionBody.getCryptoDeleteLiveHash();
    TransactionRecord record = transactionRecordSuccess(transactionBody);
    parseRecordItemAndCommit(new RecordItem(transaction, record));
    assertAll(() -> assertEquals(2, transactionRepository.count()), () -> assertEntities(), () -> assertCryptoTransfers(6), () -> assertEquals(1, liveHashRepository.count()), () -> assertTransactionAndRecord(transactionBody, record));
}
Also used : CryptoDeleteLiveHashTransactionBody(com.hederahashgraph.api.proto.java.CryptoDeleteLiveHashTransactionBody) CryptoCreateTransactionBody(com.hederahashgraph.api.proto.java.CryptoCreateTransactionBody) CryptoUpdateTransactionBody(com.hederahashgraph.api.proto.java.CryptoUpdateTransactionBody) TransactionBody(com.hederahashgraph.api.proto.java.TransactionBody) CryptoAddLiveHashTransactionBody(com.hederahashgraph.api.proto.java.CryptoAddLiveHashTransactionBody) Transaction(com.hederahashgraph.api.proto.java.Transaction) SignedTransaction(com.hederahashgraph.api.proto.java.SignedTransaction) CryptoDeleteLiveHashTransactionBody(com.hederahashgraph.api.proto.java.CryptoDeleteLiveHashTransactionBody) TransactionRecord(com.hederahashgraph.api.proto.java.TransactionRecord) RecordItem(com.hedera.mirror.common.domain.transaction.RecordItem) UtilityTest(com.hedera.mirror.importer.util.UtilityTest) Test(org.junit.jupiter.api.Test) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest)

Aggregations

RecordItem (com.hedera.mirror.common.domain.transaction.RecordItem)1 UtilityTest (com.hedera.mirror.importer.util.UtilityTest)1 CryptoAddLiveHashTransactionBody (com.hederahashgraph.api.proto.java.CryptoAddLiveHashTransactionBody)1 CryptoCreateTransactionBody (com.hederahashgraph.api.proto.java.CryptoCreateTransactionBody)1 CryptoDeleteLiveHashTransactionBody (com.hederahashgraph.api.proto.java.CryptoDeleteLiveHashTransactionBody)1 CryptoUpdateTransactionBody (com.hederahashgraph.api.proto.java.CryptoUpdateTransactionBody)1 SignedTransaction (com.hederahashgraph.api.proto.java.SignedTransaction)1 Transaction (com.hederahashgraph.api.proto.java.Transaction)1 TransactionBody (com.hederahashgraph.api.proto.java.TransactionBody)1 TransactionRecord (com.hederahashgraph.api.proto.java.TransactionRecord)1 Test (org.junit.jupiter.api.Test)1 ParameterizedTest (org.junit.jupiter.params.ParameterizedTest)1