From 04119769be5ed19fae3d823c40de05b4218d54c8 Mon Sep 17 00:00:00 2001 From: Nazarii Denha Date: Fri, 27 Sep 2024 16:38:15 +0200 Subject: [PATCH] address comments --- rollup/internal/controller/sender/sender.go | 1 - rollup/internal/controller/sender/transaction_signer.go | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/rollup/internal/controller/sender/sender.go b/rollup/internal/controller/sender/sender.go index 035186ce1..2c206a8d6 100644 --- a/rollup/internal/controller/sender/sender.go +++ b/rollup/internal/controller/sender/sender.go @@ -467,7 +467,6 @@ func (s *Sender) resubmitTransaction(tx *gethTypes.Transaction, baseFee, blobBas log.Info("Transaction gas adjustment details", "service", s.service, "name", s.name, "txInfo", txInfo) nonce := tx.Nonce() - tx.Hash() s.metrics.resubmitTransactionTotal.WithLabelValues(s.service, s.name).Inc() tx, err := s.createAndSendTx(&feeData, tx.To(), tx.Data(), tx.BlobTxSidecar(), &nonce) if err != nil { diff --git a/rollup/internal/controller/sender/transaction_signer.go b/rollup/internal/controller/sender/transaction_signer.go index c47d1fd3c..e500bd3fc 100644 --- a/rollup/internal/controller/sender/transaction_signer.go +++ b/rollup/internal/controller/sender/transaction_signer.go @@ -52,6 +52,9 @@ func NewTransactionSigner(config *config.SignerConfig, chainID *big.Int) (*Trans addr: crypto.PubkeyToAddress(privKey.PublicKey), }, nil case RemoteSignerSignerType: + if config.SignerAddress == "" { + return nil, fmt.Errorf("failed to create RemoteSigner, signer address is empty") + } rpcClient, err := rpc.Dial(config.RemoteSignerUrl) if err != nil { return nil, fmt.Errorf("failed to dial rpc client, err: %w", err) @@ -97,9 +100,6 @@ func (ts *TransactionSigner) SignTransaction(ctx context.Context, tx *gethTypes. } func (ts *TransactionSigner) SetNonce(nonce uint64) { - if ts.config.SignerType == PrivateKeySignerType { - ts.auth.Nonce = big.NewInt(int64(nonce)) - } ts.nonce = nonce }