erigon-pulse/cmd/restapi/apis/common.go
Alex Sharov 57777e7c60
Prepare codebase for future default DB change (#670)
* Add kv.tx.bucket.Clear() and db.ClearBuckets() methods

* Add kv.tx.bucket.Clear() and db.ClearBuckets() methods

* choose db based on file suffix

* implement db.id method

* implement db.id method

* use ethdb.NewDatabase method

* use ethb.MustOpen method

* cleanup

* support TEST_DB env flag

* create db path automatically needed

* bolt - don't change prefix on happy path
2020-06-16 14:36:16 +01:00

16 lines
230 B
Go

package apis
import (
"errors"
"github.com/ledgerwatch/turbo-geth/ethdb"
)
var ErrEntityNotFound = errors.New("entity not found")
type Env struct {
DB ethdb.KV
Chaindata string
RemoteDBAddress string
}