Commit 5960a01f authored by Sebastian Stammler's avatar Sebastian Stammler

op-batcher: Add data size logging to tx manager

parent 498e78ce
...@@ -62,10 +62,10 @@ func (t *TransactionManager) SendTransaction(ctx context.Context, data []byte) ( ...@@ -62,10 +62,10 @@ func (t *TransactionManager) SendTransaction(ctx context.Context, data []byte) (
ctx, cancel := context.WithTimeout(ctx, 100*time.Second) // TODO: Select a timeout that makes sense here. ctx, cancel := context.WithTimeout(ctx, 100*time.Second) // TODO: Select a timeout that makes sense here.
defer cancel() defer cancel()
if receipt, err := t.txMgr.Send(ctx, updateGasPrice, t.l1Client.SendTransaction); err != nil { if receipt, err := t.txMgr.Send(ctx, updateGasPrice, t.l1Client.SendTransaction); err != nil {
t.log.Warn("unable to publish tx", "err", err) t.log.Warn("unable to publish tx", "err", err, "data_size", len(data))
return nil, err return nil, err
} else { } else {
t.log.Info("tx successfully published", "tx_hash", receipt.TxHash) t.log.Info("tx successfully published", "tx_hash", receipt.TxHash, "data_size", len(data))
return receipt, nil return receipt, nil
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment