From b4e8701922cad26b57572bc9c13ddb1e56e16161 Mon Sep 17 00:00:00 2001 From: evan-forbes Date: Mon, 21 Aug 2023 13:05:26 -0500 Subject: [PATCH] chore: update the keyname to reflect the change --- pkg/trace/schema/consensus.go | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/pkg/trace/schema/consensus.go b/pkg/trace/schema/consensus.go index 4b57350e5b..3fea523853 100644 --- a/pkg/trace/schema/consensus.go +++ b/pkg/trace/schema/consensus.go @@ -91,9 +91,9 @@ const ( // | time | height | timestamp | BlockTable = "consensus_block" - // TimestampFieldKey is the name of the field that stores the timestamp in - // the last commit. - TimestampFieldKey = "timestamp" + // UnixMillisecondTimestampFieldKey is the name of the field that stores the timestamp in + // the last commit in unix milliseconds. + UnixMillisecondTimestampFieldKey = "unix_millisecond_timestamp" // TxCountFieldKey is the name of the field that stores the number of // transactions in the block. @@ -119,12 +119,12 @@ const ( func WriteBlock(client *trace.Client, block *types.Block, size int) { client.WritePoint(BlockTable, map[string]interface{}{ - HeightFieldKey: block.Height, - TimestampFieldKey: block.Time.UnixMilli(), - TxCountFieldKey: len(block.Data.Txs), - SquareSizeFieldKey: block.SquareSize, - BlockSizeFieldKey: size, - ProposerFieldKey: block.ProposerAddress.String(), - LastCommitRoundFieldKey: block.LastCommit.Round, + HeightFieldKey: block.Height, + UnixMillisecondTimestampFieldKey: block.Time.UnixMilli(), + TxCountFieldKey: len(block.Data.Txs), + SquareSizeFieldKey: block.SquareSize, + BlockSizeFieldKey: size, + ProposerFieldKey: block.ProposerAddress.String(), + LastCommitRoundFieldKey: block.LastCommit.Round, }) }