From 5497ed4c8d1792aea651f208878f89193511dea6 Mon Sep 17 00:00:00 2001 From: Greg Scullard Date: Thu, 29 Aug 2019 02:28:05 +0200 Subject: [PATCH 1/2] Fixed lowercase bug, added error logging in the event of transaction type not known Signed-off-by: Greg Scullard --- .../java/com/hedera/recordFileLogger/RecordFileLogger.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/hedera/recordFileLogger/RecordFileLogger.java b/src/main/java/com/hedera/recordFileLogger/RecordFileLogger.java index 39c2606269d..57ca5960ec8 100644 --- a/src/main/java/com/hedera/recordFileLogger/RecordFileLogger.java +++ b/src/main/java/com/hedera/recordFileLogger/RecordFileLogger.java @@ -712,7 +712,8 @@ private static int getTransactionTypeId (TransactionBody body) { if (transactionTypes.containsKey(transactionName)) { return transactionTypes.get(transactionName); } else { - return transactionTypes.get("unknown"); + log.error("Transaction type {} not known to mirror node, storing 'UNKNOWN'", transactionName); + return transactionTypes.get("UNKNOWN"); } } From 3f869e771dc348554823e983df7e3af37f73a6e7 Mon Sep 17 00:00:00 2001 From: Greg Scullard Date: Thu, 29 Aug 2019 02:28:48 +0200 Subject: [PATCH 2/2] Added Freeze transaction, fixed proto_ids which were incorrect (not used by mirror node) Signed-off-by: Greg Scullard --- .../migration/V1.10.1__freeze_transaction.sql | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 src/main/resources/db/migration/V1.10.1__freeze_transaction.sql diff --git a/src/main/resources/db/migration/V1.10.1__freeze_transaction.sql b/src/main/resources/db/migration/V1.10.1__freeze_transaction.sql new file mode 100644 index 00000000000..84a6bac3e50 --- /dev/null +++ b/src/main/resources/db/migration/V1.10.1__freeze_transaction.sql @@ -0,0 +1,18 @@ +INSERT INTO t_transaction_types (proto_id, name) values (23,'FREEZE'); + +UPDATE t_transaction_types set proto_id = 14 WHERE name = 'CRYPTOTRANSFER'; +UPDATE t_transaction_types set proto_id = 15 WHERE name = 'CRYPTOUPDATEACCOUNT'; +UPDATE t_transaction_types set proto_id = 12 WHERE name = 'CRYPTODELETE'; +UPDATE t_transaction_types set proto_id = 10 WHERE name = 'CRYPTOADDCLAIM'; +UPDATE t_transaction_types set proto_id = 13 WHERE name = 'CRYPTODELETECLAIM'; +UPDATE t_transaction_types set proto_id = 7 WHERE name = 'CONTRACTCALL'; +UPDATE t_transaction_types set proto_id = 8 WHERE name = 'CONTRACTCREATEINSTANCE'; +UPDATE t_transaction_types set proto_id = 9 WHERE name = 'CONTRACTUPDATEINSTANCE'; +UPDATE t_transaction_types set proto_id = 17 WHERE name = 'FILECREATE'; +UPDATE t_transaction_types set proto_id = 16 WHERE name = 'FILEAPPEND'; +UPDATE t_transaction_types set proto_id = 19 WHERE name = 'FILEUPDATE'; +UPDATE t_transaction_types set proto_id = 18 WHERE name = 'FILEDELETE'; +UPDATE t_transaction_types set proto_id = 11 WHERE name = 'CRYPTOCREATEACCOUNT'; +UPDATE t_transaction_types set proto_id = 20 WHERE name = 'SYSTEMDELETE'; +UPDATE t_transaction_types set proto_id = 21 WHERE name = 'SYSTEMUNDELETE'; +UPDATE t_transaction_types set proto_id = 22 WHERE name = 'CONTRACTDELETEINSTANCE';