From 195a600602b7852524f9eafd7d0a16a8e6462944 Mon Sep 17 00:00:00 2001 From: Acha Bill Date: Thu, 27 Feb 2020 16:35:44 +0100 Subject: [PATCH] rename zmq tx_trytes to trytes --- src/main/java/com/iota/iri/zmq/README.md | 2 +- .../iota/iri/zmq/ZmqMessageQueueProvider.java | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/main/java/com/iota/iri/zmq/README.md b/src/main/java/com/iota/iri/zmq/README.md index b32c232d65..4b8fe53e59 100644 --- a/src/main/java/com/iota/iri/zmq/README.md +++ b/src/main/java/com/iota/iri/zmq/README.md @@ -28,7 +28,7 @@ Topics currently found in the latest code are * `sn` for newly confirmed transactions ( by solid milestone children measurement ) * `sn_trytes` for raw trytes, transaction hash, and snapshot index of confirmed transactions. * `tx` for newly seen transactions -* `tx_trytes` trytes of newly seen transactions +* `trytes` trytes of newly seen transactions * `
` to watch activity on an address All topic must be lowercase (to not clash with `
` containing the topic title - like `TXCR9...` & `TX`) diff --git a/src/main/java/com/iota/iri/zmq/ZmqMessageQueueProvider.java b/src/main/java/com/iota/iri/zmq/ZmqMessageQueueProvider.java index 289bce9a6a..fd167224b9 100644 --- a/src/main/java/com/iota/iri/zmq/ZmqMessageQueueProvider.java +++ b/src/main/java/com/iota/iri/zmq/ZmqMessageQueueProvider.java @@ -40,7 +40,7 @@ public boolean publishTransaction(Persistable model, Indexable index, String ite TransactionViewModel transactionViewModel = new TransactionViewModel(transaction, (Hash)index); publishTx(transactionViewModel); - publishTxTrytes(transactionViewModel); + publishTrytes(transactionViewModel); return true; } @@ -70,18 +70,18 @@ private void publishTx(TransactionViewModel transactionViewModel) { } } - private void publishTxTrytes(TransactionViewModel transactionViewModel) { - StringBuilder txTrytesStringBuilder = new StringBuilder(TransactionViewModel.TRINARY_SIZE/3); + private void publishTrytes(TransactionViewModel transactionViewModel) { + StringBuilder trytesStringBuilder = new StringBuilder(TransactionViewModel.TRINARY_SIZE/3); try { - txTrytesStringBuilder.append("tx_trytes "); - txTrytesStringBuilder.append(Converter.trytes(transactionViewModel.trits())); txTrytesStringBuilder.append(" "); - txTrytesStringBuilder.append(transactionViewModel.getHash()); + trytesStringBuilder.append("trytes "); + trytesStringBuilder.append(Converter.trytes(transactionViewModel.trits())); trytesStringBuilder.append(" "); + trytesStringBuilder.append(transactionViewModel.getHash()); - messageQ.publish(txTrytesStringBuilder.toString()); + messageQ.publish(trytesStringBuilder.toString()); } catch (Exception e) { - log.error(txTrytesStringBuilder.toString()); - log.error("Error publishing tx_trytes to zmq.", e); + log.error(trytesStringBuilder.toString()); + log.error("Error publishing trytes to zmq.", e); } }