Skip to content

Commit

Permalink
chore: update the keyname to reflect the change
Browse files Browse the repository at this point in the history
  • Loading branch information
evan-forbes committed Aug 21, 2023
1 parent 261823a commit b4e8701
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions pkg/trace/schema/consensus.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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,
})
}

0 comments on commit b4e8701

Please sign in to comment.