From e7d4d64d7e480c67580788972a0cc065d2d73ba3 Mon Sep 17 00:00:00 2001 From: David Date: Fri, 30 Aug 2024 12:19:42 +0800 Subject: [PATCH] feat: rename some vars --- packages/taiko-client/cmd/flags/common.go | 10 +++++----- packages/taiko-client/proposer/config.go | 2 +- packages/taiko-client/proposer/proposer.go | 2 +- packages/taiko-client/prover/config.go | 2 +- packages/taiko-client/prover/prover.go | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/packages/taiko-client/cmd/flags/common.go b/packages/taiko-client/cmd/flags/common.go index c03e38ac20f..834dd8d3d67 100644 --- a/packages/taiko-client/cmd/flags/common.go +++ b/packages/taiko-client/cmd/flags/common.go @@ -28,11 +28,11 @@ var ( Category: commonCategory, EnvVars: []string{"L1_WS"}, } - L1PrivateTxEndpoint = &cli.StringFlag{ - Name: "l1.privateTx", - Usage: "RPC endpoint of a L1 private tx ethereum node", + L1PrivateEndpoint = &cli.StringFlag{ + Name: "l1.private", + Usage: "RPC endpoint of a L1 node with private mempool", Category: commonCategory, - EnvVars: []string{"L1_PRIVATE_TX"}, + EnvVars: []string{"L1_PRIVATE"}, } L2WSEndpoint = &cli.StringFlag{ Name: "l2.ws", @@ -173,7 +173,7 @@ var CommonFlags = []cli.Flag{ BackOffMaxRetries, BackOffRetryInterval, RPCTimeout, - L1PrivateTxEndpoint, + L1PrivateEndpoint, } // MergeFlags merges the given flag slices. diff --git a/packages/taiko-client/proposer/config.go b/packages/taiko-client/proposer/config.go index 481e415c3c0..d8444e080ea 100644 --- a/packages/taiko-client/proposer/config.go +++ b/packages/taiko-client/proposer/config.go @@ -107,7 +107,7 @@ func NewConfigFromCliContext(c *cli.Context) (*Config, error) { c, ), PrivateTxmgrConfigs: pkgFlags.InitTxmgrConfigsFromCli( - c.String(flags.L1PrivateTxEndpoint.Name), + c.String(flags.L1PrivateEndpoint.Name), l1ProposerPrivKey, c, ), diff --git a/packages/taiko-client/proposer/proposer.go b/packages/taiko-client/proposer/proposer.go index 81e1e27f60e..89211a78d3d 100644 --- a/packages/taiko-client/proposer/proposer.go +++ b/packages/taiko-client/proposer/proposer.go @@ -106,7 +106,7 @@ func (p *Proposer) InitFromConfig( if privateTxMgr == nil && cfg.PrivateTxmgrConfigs != nil && len(cfg.PrivateTxmgrConfigs.L1RPCURL) > 0 { if privateTxMgr, err = txmgr.NewSimpleTxManager( - "privateTxProposer", + "privateMempoolProposer", log.Root(), &metrics.TxMgrMetrics, *cfg.PrivateTxmgrConfigs, diff --git a/packages/taiko-client/prover/config.go b/packages/taiko-client/prover/config.go index 2b12120bd10..0709f4be3df 100644 --- a/packages/taiko-client/prover/config.go +++ b/packages/taiko-client/prover/config.go @@ -179,7 +179,7 @@ func NewConfigFromCliContext(c *cli.Context) (*Config, error) { c, ), PrivateTxmgrConfigs: pkgFlags.InitTxmgrConfigsFromCli( - c.String(flags.L1PrivateTxEndpoint.Name), + c.String(flags.L1PrivateEndpoint.Name), l1ProverPrivKey, c, ), diff --git a/packages/taiko-client/prover/prover.go b/packages/taiko-client/prover/prover.go index 1a657e3a38e..81710ff7d8d 100644 --- a/packages/taiko-client/prover/prover.go +++ b/packages/taiko-client/prover/prover.go @@ -169,7 +169,7 @@ func InitFromConfig( } else { if cfg.PrivateTxmgrConfigs != nil && len(cfg.PrivateTxmgrConfigs.L1RPCURL) > 0 { if p.privateTxmgr, err = txmgr.NewSimpleTxManager( - "privateTxProver", + "privateMempoolProver", log.Root(), &metrics.TxMgrMetrics, *cfg.PrivateTxmgrConfigs,