mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-26 14:46:42 +00:00
upstream: fixed remaining compilation errors
This commit is contained in:
parent
f47516d51f
commit
ff753eed8b
4 changed files with 4 additions and 31 deletions
|
|
@ -18,7 +18,6 @@
|
||||||
package memorydb
|
package memorydb
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
|
||||||
"errors"
|
"errors"
|
||||||
"sort"
|
"sort"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
@ -131,20 +130,6 @@ func (db *Database) Delete(key []byte) error {
|
||||||
return nil
|
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)
|
// DeleteRange deletes all of the keys (and values) in the range [start,end)
|
||||||
// (inclusive on start, exclusive on end).
|
// (inclusive on start, exclusive on end).
|
||||||
func (db *Database) DeleteRange(start, end []byte) error {
|
func (db *Database) DeleteRange(start, end []byte) error {
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,7 @@ func NewExecutionPool(initialSize int, timeout time.Duration, service string, re
|
||||||
|
|
||||||
sp.executionPool.Store(workerpool.New(initialSize))
|
sp.executionPool.Store(workerpool.New(initialSize))
|
||||||
|
|
||||||
if metrics.Enabled && report {
|
if metrics.Enabled() && report {
|
||||||
go sp.reportMetrics(3 * time.Second)
|
go sp.reportMetrics(3 * time.Second)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -117,8 +117,8 @@ func (s *SafePool) Stop() {
|
||||||
// regarding the execution pool.
|
// regarding the execution pool.
|
||||||
func (s *SafePool) reportMetrics(refresh time.Duration) {
|
func (s *SafePool) reportMetrics(refresh time.Duration) {
|
||||||
var (
|
var (
|
||||||
epWorkerCountGuage metrics.Gauge
|
epWorkerCountGuage *metrics.Gauge
|
||||||
epWaitingQueueGuage metrics.Gauge
|
epWaitingQueueGuage *metrics.Gauge
|
||||||
epProcessedRequestsHistogram metrics.Histogram
|
epProcessedRequestsHistogram metrics.Histogram
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ func updateServeTimeHistogram(method string, success bool, elapsed time.Duration
|
||||||
metrics.GetOrRegisterHistogramLazy(h, nil, sampler).Update(elapsed.Nanoseconds())
|
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)
|
epWorkerCount := fmt.Sprintf("rpc/ep/workers/%s", service)
|
||||||
epWaitingQueue := fmt.Sprintf("rpc/ep/queue/%s", service)
|
epWaitingQueue := fmt.Sprintf("rpc/ep/queue/%s", service)
|
||||||
epProcessedRequests := fmt.Sprintf("rpc/ep/processed/%s", service)
|
epProcessedRequests := fmt.Sprintf("rpc/ep/processed/%s", service)
|
||||||
|
|
|
||||||
|
|
@ -104,15 +104,3 @@ func FuzzG2SubgroupChecks(f *testing.F) {
|
||||||
fuzzG2SubgroupChecks(data)
|
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)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue