From 7d597e44d4e2ead89e7179be75d6cbc2c708f14b Mon Sep 17 00:00:00 2001 From: songzhibin97 <718428482@qq.com> Date: Tue, 22 Oct 2024 00:27:07 +0800 Subject: [PATCH] fix: some normative recommendations --- common/testcontainers/testcontainers.go | 2 +- coordinator/internal/types/prover.go | 4 ++-- rollup/internal/controller/sender/sender.go | 2 +- rollup/internal/controller/sender/transaction_signer.go | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/common/testcontainers/testcontainers.go b/common/testcontainers/testcontainers.go index eb53152cdc..c1c55480bb 100644 --- a/common/testcontainers/testcontainers.go +++ b/common/testcontainers/testcontainers.go @@ -195,7 +195,7 @@ func (t *TestcontainerApps) GetL2GethEndPoint() (string, error) { return endpoint, nil } -// GetL2GethEndPoint returns the endpoint of the running L2Geth container +// GetWeb3SignerEndpoint returns the endpoint of the running L2Geth container func (t *TestcontainerApps) GetWeb3SignerEndpoint() (string, error) { if t.web3SignerContainer == nil || !t.web3SignerContainer.IsRunning() { return "", errors.New("web3signer is not running") diff --git a/coordinator/internal/types/prover.go b/coordinator/internal/types/prover.go index 9dcc9fbeb9..0957755fd7 100644 --- a/coordinator/internal/types/prover.go +++ b/coordinator/internal/types/prover.go @@ -30,8 +30,8 @@ const ( ) // MakeProverType make ProverType from ProofType -func MakeProverType(proof_type message.ProofType) ProverType { - switch proof_type { +func MakeProverType(proofType message.ProofType) ProverType { + switch proofType { case message.ProofTypeChunk: return ProverTypeChunk case message.ProofTypeBatch, message.ProofTypeBundle: diff --git a/rollup/internal/controller/sender/sender.go b/rollup/internal/controller/sender/sender.go index 2c206a8d6c..c1a590ad07 100644 --- a/rollup/internal/controller/sender/sender.go +++ b/rollup/internal/controller/sender/sender.go @@ -38,7 +38,7 @@ const ( ) var ( - // ErrTooManyPendingBlobTxs + // ErrTooManyPendingBlobTxs error for too many pending blob txs ErrTooManyPendingBlobTxs = errors.New("the limit of pending blob-carrying transactions has been exceeded") ) diff --git a/rollup/internal/controller/sender/transaction_signer.go b/rollup/internal/controller/sender/transaction_signer.go index 5bc4c5df15..68305afb36 100644 --- a/rollup/internal/controller/sender/transaction_signer.go +++ b/rollup/internal/controller/sender/transaction_signer.go @@ -17,10 +17,10 @@ import ( ) const ( - // PrivateKeySignerType + // PrivateKeySignerType is the type of signer that uses a private key to sign transactions PrivateKeySignerType = "PrivateKey" - // RemoteSignerType + // RemoteSignerType is the type of signer that uses a remote signer to sign transactions RemoteSignerType = "RemoteSigner" )