From fd05e92e814e35b50a16544a3320e8b2670f4531 Mon Sep 17 00:00:00 2001 From: conan <12594210+0x0conan@users.noreply.github.com> Date: Sun, 23 Jun 2024 17:20:56 +0800 Subject: [PATCH] fix: correct log message for empty transaction messages The previous log incorrectly indicated a failure to unmarshal the transaction when no messages were present. This commit changes the log to accurately state that the transaction contains no messages. This helps in understanding the real issue and prevents misleading error reports. --- blocksync/txns.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blocksync/txns.go b/blocksync/txns.go index 032ba6d..f783c72 100644 --- a/blocksync/txns.go +++ b/blocksync/txns.go @@ -206,7 +206,7 @@ func StoreWasmTransaction(txn []interface{}, db *leveldb.DB, JsonAPI string) { } if len(txns.TxResponse.Tx.Body.Messages) == 0 { - logs.Log.Warn(fmt.Sprintf("Failed to unmarshal transaction: %s", err)) + logs.Log.Warn("Transaction contains no messages") time.Sleep(2 * time.Second) continue }