Browse Source

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.
remove_0mq
Jack Grigg 5 years ago
parent
commit
c4a48902db
No known key found for this signature in database GPG Key ID: 9E8255172BBF9898
  1. 4
      cmd/ingest/main.go

4
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(),

Loading…
Cancel
Save