From c4a48902db4b25e5f063117b33c6a435228853da Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Thu, 23 May 2019 13:42:02 +0100 Subject: [PATCH] ingest: Log block and transaction hashes in display order We should also be consistent in the SQLite database about either storing as TEXT in display order, or storing as BLOB in wire order. But as that's another breaking change, let's bundle it in with anything else we need to do to address this problem. --- cmd/ingest/main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/ingest/main.go b/cmd/ingest/main.go index f4a802a..0255b68 100644 --- a/cmd/ingest/main.go +++ b/cmd/ingest/main.go @@ -201,7 +201,7 @@ func handleBlock(db *sql.DB, sequence int, blockData []byte) { entry := log.WithFields(logrus.Fields{ "seqnum": sequence, "block_height": block.GetHeight(), - "block_hash": blockHash, + "block_hash": hex.EncodeToString(block.GetDisplayHash()), "block_version": block.GetVersion(), "tx_count": block.GetTxCount(), "sapling": block.HasSaplingTransactions(), @@ -226,7 +226,7 @@ func handleBlock(db *sql.DB, sequence int, blockData []byte) { ) entry = log.WithFields(logrus.Fields{ "block_height": block.GetHeight(), - "block_hash": blockHash, + "block_hash": hex.EncodeToString(block.GetDisplayHash()), "tx_index": index, "tx_size": len(tx.Bytes()), "sapling": tx.HasSaplingTransactions(),