From ff753eed8b212b8567ee325c87367f7b1f14b6e7 Mon Sep 17 00:00:00 2001 From: Pratik Patil Date: Fri, 2 May 2025 10:43:52 +0530 Subject: [PATCH] upstream: fixed remaining compilation errors --- ethdb/memorydb/memorydb.go | 15 --------------- rpc/execution_pool.go | 6 +++--- rpc/metrics.go | 2 +- tests/fuzzers/bls12381/bls12381_test.go | 12 ------------ 4 files changed, 4 insertions(+), 31 deletions(-) diff --git a/ethdb/memorydb/memorydb.go b/ethdb/memorydb/memorydb.go index 3b176f84e8..d5d28fdd15 100644 --- a/ethdb/memorydb/memorydb.go +++ b/ethdb/memorydb/memorydb.go @@ -18,7 +18,6 @@ package memorydb import ( - "bytes" "errors" "sort" "strings" @@ -131,20 +130,6 @@ func (db *Database) Delete(key []byte) error { return nil } -// DeleteRange deletes all of the keys (and values) in the range [start,end) -// (inclusive on start, exclusive on end). -func (db *Database) DeleteRange(start, end []byte) error { - it := db.NewIterator(nil, start) - defer it.Release() - - for it.Next() && bytes.Compare(end, it.Key()) > 0 { - if err := db.Delete(it.Key()); err != nil { - return err - } - } - return nil -} - // DeleteRange deletes all of the keys (and values) in the range [start,end) // (inclusive on start, exclusive on end). func (db *Database) DeleteRange(start, end []byte) error { diff --git a/rpc/execution_pool.go b/rpc/execution_pool.go index 378ed55fa2..05981fbdc5 100644 --- a/rpc/execution_pool.go +++ b/rpc/execution_pool.go @@ -44,7 +44,7 @@ func NewExecutionPool(initialSize int, timeout time.Duration, service string, re sp.executionPool.Store(workerpool.New(initialSize)) - if metrics.Enabled && report { + if metrics.Enabled() && report { go sp.reportMetrics(3 * time.Second) } @@ -117,8 +117,8 @@ func (s *SafePool) Stop() { // regarding the execution pool. func (s *SafePool) reportMetrics(refresh time.Duration) { var ( - epWorkerCountGuage metrics.Gauge - epWaitingQueueGuage metrics.Gauge + epWorkerCountGuage *metrics.Gauge + epWaitingQueueGuage *metrics.Gauge epProcessedRequestsHistogram metrics.Histogram ) diff --git a/rpc/metrics.go b/rpc/metrics.go index 4374062cec..d07a9f36e7 100644 --- a/rpc/metrics.go +++ b/rpc/metrics.go @@ -50,7 +50,7 @@ func updateServeTimeHistogram(method string, success bool, elapsed time.Duration metrics.GetOrRegisterHistogramLazy(h, nil, sampler).Update(elapsed.Nanoseconds()) } -func newEpMetrics(service string) (metrics.Gauge, metrics.Gauge, metrics.Histogram) { +func newEpMetrics(service string) (*metrics.Gauge, *metrics.Gauge, metrics.Histogram) { epWorkerCount := fmt.Sprintf("rpc/ep/workers/%s", service) epWaitingQueue := fmt.Sprintf("rpc/ep/queue/%s", service) epProcessedRequests := fmt.Sprintf("rpc/ep/processed/%s", service) diff --git a/tests/fuzzers/bls12381/bls12381_test.go b/tests/fuzzers/bls12381/bls12381_test.go index cfa2b686de..cb89d8a7a7 100644 --- a/tests/fuzzers/bls12381/bls12381_test.go +++ b/tests/fuzzers/bls12381/bls12381_test.go @@ -104,15 +104,3 @@ func FuzzG2SubgroupChecks(f *testing.F) { fuzzG2SubgroupChecks(data) }) } - -func FuzzG2Mul(f *testing.F) { - f.Fuzz(func(t *testing.T, data []byte) { - fuzz(blsG2Mul, data) - }) -} - -func FuzzG1Mul(f *testing.F) { - f.Fuzz(func(t *testing.T, data []byte) { - fuzz(blsG1Mul, data) - }) -}