From cb69fdae2397efd0acbfb3a7ff4d2b7a7a56fa53 Mon Sep 17 00:00:00 2001 From: Moreti Georgiev Date: Thu, 10 Oct 2024 11:55:32 +0300 Subject: [PATCH] chore: clean up debug logs --- cmd/rpcdaemon/commands/eth_receipts.go | 1 - cmd/rpcdaemon/commands/tracing.go | 2 +- cmd/rpcdaemon/commands/tracing_zkevm.go | 2 +- eth/backend.go | 2 +- turbo/rpchelper/helper_zkevm.go | 3 +-- 5 files changed, 4 insertions(+), 6 deletions(-) diff --git a/cmd/rpcdaemon/commands/eth_receipts.go b/cmd/rpcdaemon/commands/eth_receipts.go index 86ed8b9e1e1..4d893398e80 100644 --- a/cmd/rpcdaemon/commands/eth_receipts.go +++ b/cmd/rpcdaemon/commands/eth_receipts.go @@ -267,7 +267,6 @@ func getTopicsBitmap(c kv.Tx, topics [][]common.Hash, from, to uint64) (*roaring } return result, nil } - func getAddrsBitmap(tx kv.Tx, addrs []common.Address, from, to uint64) (*roaring.Bitmap, error) { if len(addrs) == 0 { return nil, nil diff --git a/cmd/rpcdaemon/commands/tracing.go b/cmd/rpcdaemon/commands/tracing.go index 53c509c891e..b32cf4ae749 100644 --- a/cmd/rpcdaemon/commands/tracing.go +++ b/cmd/rpcdaemon/commands/tracing.go @@ -501,7 +501,7 @@ func (api *PrivateDebugAPIImpl) TraceCallMany_deprecated(ctx context.Context, bu ibs := evm.IntraBlockState().(*state.IntraBlockState) ibs.Prepare(common.Hash{}, parent.Hash(), txn_index) err = transactions.TraceTx(ctx, msg, blockCtx, txCtx, evm.IntraBlockState(), config, chainConfig, stream, api.evmCallTimeout) - + if err != nil { stream.WriteNil() return err diff --git a/cmd/rpcdaemon/commands/tracing_zkevm.go b/cmd/rpcdaemon/commands/tracing_zkevm.go index 9512b985b4f..21ce600c541 100644 --- a/cmd/rpcdaemon/commands/tracing_zkevm.go +++ b/cmd/rpcdaemon/commands/tracing_zkevm.go @@ -337,7 +337,7 @@ func (api *PrivateDebugAPIImpl) TraceCallMany(ctx context.Context, bundles []Bun ibs := evm.IntraBlockState().(*state.IntraBlockState) ibs.Prepare(common.Hash{}, parent.Hash(), txn_index) err = transactions.TraceTx(ctx, msg, blockCtx, txCtx, evm.IntraBlockState(), config, chainConfig, stream, api.evmCallTimeout) - + if err != nil { stream.WriteNil() return err diff --git a/eth/backend.go b/eth/backend.go index 200df979569..bb341749b39 100644 --- a/eth/backend.go +++ b/eth/backend.go @@ -1033,7 +1033,7 @@ func newEtherMan(cfg *ethconfig.Config, l2ChainName, url string) *etherman.Clien } em, err := etherman.NewClient(ethmanConf) - // panic on error + //panic on error if err != nil { panic(err) } diff --git a/turbo/rpchelper/helper_zkevm.go b/turbo/rpchelper/helper_zkevm.go index e5451154df7..593549b224e 100644 --- a/turbo/rpchelper/helper_zkevm.go +++ b/turbo/rpchelper/helper_zkevm.go @@ -44,7 +44,6 @@ func GetBatchNumber(rpcBatchNumber rpc.BlockNumber, tx kv.Tx, filters *Filters) default: batchNumber = uint64(rpcBatchNumber.Int64()) } - fmt.Println("== ExecutedBlock == ", executedBlock) - fmt.Println("== GetBatchNumber == ", batchNumber) + return batchNumber, batchNumber == plainStateBatchNumber, nil }