From 799fc4162b3e71014d1789381ab62b705c4f7bc1 Mon Sep 17 00:00:00 2001 From: Dusan Brajovic Date: Fri, 21 Jul 2023 14:37:17 +0200 Subject: [PATCH] log --- orchestrator/ethereum/committer/eth_committer.go | 7 ++++--- orchestrator/signer.go | 6 ++---- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/orchestrator/ethereum/committer/eth_committer.go b/orchestrator/ethereum/committer/eth_committer.go index ca29d9ca..b231f1b8 100644 --- a/orchestrator/ethereum/committer/eth_committer.go +++ b/orchestrator/ethereum/committer/eth_committer.go @@ -150,9 +150,8 @@ func (e *ethCommitter) SendTx( return nil } else { log.WithFields(log.Fields{ - "txHash": txHash.Hex(), - "txHashRet": txHashRet.Hex(), - }).WithError(err).Warningln("SendTransaction failed with error") + "tx_hash": txHash.Hex(), + }).WithError(err).Warningln("failed to send tx") } switch { @@ -199,6 +198,8 @@ func (e *ethCommitter) SendTx( }); err != nil { metrics.ReportFuncError(e.svcTags) + log.WithError(err).Errorln("SendTx serialize failed") + return common.Hash{}, err } diff --git a/orchestrator/signer.go b/orchestrator/signer.go index c27c53f1..a2d376b2 100644 --- a/orchestrator/signer.go +++ b/orchestrator/signer.go @@ -66,6 +66,8 @@ type ethSigner struct { } func (s *ethSigner) run(ctx context.Context, injective InjectiveNetwork) error { + s.log.Infoln("scanning Injective for unconfirmed batches and valset updates") + if err := s.signNewValsetUpdates(ctx, injective); err != nil { return err } @@ -78,8 +80,6 @@ func (s *ethSigner) run(ctx context.Context, injective InjectiveNetwork) error { } func (s *ethSigner) signNewBatches(ctx context.Context, injective InjectiveNetwork) error { - s.log.Infoln("scanning Injective for unconfirmed batch") - oldestUnsignedTransactionBatch, err := s.getUnsignedBatch(ctx, injective) if err != nil { return err @@ -149,8 +149,6 @@ func (s *ethSigner) signNewValsetUpdates( ctx context.Context, injective InjectiveNetwork, ) error { - s.log.Infoln("scanning Injective for unconfirmed valset updates") - oldestUnsignedValsets, err := s.getUnsignedValsets(ctx, injective) if err != nil { return err