use of com.hederahashgraph.api.proto.java.TransactionID in project hedera-mirror-node by hashgraph.
the class EntityRecordItemListenerTopicTest method submitMessageTestFiltered.
@Test
void submitMessageTestFiltered() {
// given
var responseCode = SUCCESS;
var topicId = (TopicID) new TopicIdArgumentConverter().convert("0.0.999", // excluded in application-default.yml
null);
var consensusTimestamp = 10_000_000L;
var message = "message";
var sequenceNumber = 10_000L;
var runningHash = "running-hash";
var runningHashVersion = 1;
var chunkNum = 3;
var chunkTotal = 5;
var validStartNs = 7L;
var scheduled = false;
var nonce = 0;
TransactionID initialTransactionId = createTransactionID(PAYER_ACCOUNT_ID.getEntityNum(), TestUtils.toTimestamp(validStartNs), scheduled, nonce);
var transaction = createSubmitMessageTransaction(topicId, message, chunkNum, chunkTotal, initialTransactionId);
var transactionRecord = createTransactionRecord(topicId, sequenceNumber, runningHash.getBytes(), runningHashVersion, consensusTimestamp, responseCode);
// when
parseRecordItemAndCommit(new RecordItem(transaction, transactionRecord));
// then
// if the transaction is filtered out, nothing in it should affect the state
assertEquals(0L, entityRepository.count());
assertEquals(0L, topicMessageRepository.count());
}
Aggregations