From e3a4d209813482ed95c6337dc689f8271d00a572 Mon Sep 17 00:00:00 2001 From: Daisuke Kanda <daisuke.kanda@datachain.jp> Date: Fri, 20 Sep 2024 07:21:03 +0000 Subject: [PATCH] log tx_size Signed-off-by: Daisuke Kanda <daisuke.kanda@datachain.jp> --- pkg/relay/ethereum/log.go | 1 + pkg/relay/ethereum/tx.go | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/pkg/relay/ethereum/log.go b/pkg/relay/ethereum/log.go index 11310fc..b3ea638 100644 --- a/pkg/relay/ethereum/log.go +++ b/pkg/relay/ethereum/log.go @@ -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" diff --git a/pkg/relay/ethereum/tx.go b/pkg/relay/ethereum/tx.go index 050d557..e6ea895 100644 --- a/pkg/relay/ethereum/tx.go +++ b/pkg/relay/ethereum/tx.go @@ -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 {