Skip to content

Commit

Permalink
log tx_size
Browse files Browse the repository at this point in the history
Signed-off-by: Daisuke Kanda <[email protected]>
  • Loading branch information
Daisuke Kanda committed Sep 20, 2024
1 parent b10093a commit e3a4d20
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions pkg/relay/ethereum/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const (
logAttrRawErrorData = "raw_error_data"
logAttrRawTxData = "raw_tx_data"
logAttrTxHash = "tx_hash"
logAttrTxSize = "tx_size"
logAttrBlockHash = "block_hash"
logAttrBlockNumber = "block_number"
logAttrTxIndex = "tx_index"
Expand Down
5 changes: 4 additions & 1 deletion pkg/relay/ethereum/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,10 @@ func (c *Chain) SendMsgs(msgs []sdk.Msg) ([]core.MsgID, error) {
break
} else {
logger = iter.updateLoggerMessageInfo(logger, from, built.count)
logger = &log.RelayLogger{Logger: logger.With(logAttrTxHash, built.tx.Hash())}
logger = &log.RelayLogger{Logger: logger.With(
logAttrTxHash, built.tx.Hash(),
logAttrTxSize, built.tx.Size(),
)}
}

if rawTxData, err := built.tx.MarshalBinary(); err != nil {
Expand Down

0 comments on commit e3a4d20

Please sign in to comment.