mirror of
https://github.com/luxfi/coreth.git
synced 2026-10-30 17:00:51 +00:00
- Add //go:build pebble to import_mode.go - Create import_mode_stub.go for when pebble is not available - Extract database opening into database_pebble.go with build tag - Create database_stub.go for when pebble is not available - Update vm.go to use openSourceDatabase helper - Update to [email protected] with optional pebble/leveldb To use pebble database: go build -tags=pebble Default (no tags): badgerdb only This reduces binary size when pebble is not needed.
15 lines
317 B
Go
15 lines
317 B
Go
//go:build !pebble
|
|
|
|
package evm
|
|
|
|
import (
|
|
"errors"
|
|
|
|
"github.com/luxfi/geth/ethdb"
|
|
)
|
|
|
|
// openSourceDatabase returns an error when pebble is not available
|
|
func openSourceDatabase(dataPath string) (ethdb.Database, error) {
|
|
return nil, errors.New("database import requires pebble support (build with -tags=pebble)")
|
|
}
|