erigon-pulse/turbo/node/buckets.go
Alex Sharov 0be3044b7e
rename (#1978)
* rename

* rename "make grpc"

* rename "abi bindings templates"

* rename "abi bindings templates"
2021-05-20 19:25:53 +01:00

25 lines
464 B
Go

package node
import (
"fmt"
"github.com/ledgerwatch/erigon/common/dbutils"
)
func prepareBuckets(customBuckets dbutils.BucketsCfg) {
if len(customBuckets) == 0 {
return
}
currentBuckets := dbutils.DefaultBuckets()
for k, v := range customBuckets {
if _, ok := currentBuckets[k]; ok {
panic(fmt.Errorf("overriding existing buckets is not supported (bucket key=%s)", k))
}
currentBuckets[k] = v
}
dbutils.UpdateBucketsList(currentBuckets)
}