Files
coreth/plugin/evm/database_stub.go
zeekay 167a9fddab feat: make pebble optional via build tags
- 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.
2025-12-21 12:13:13 -08:00

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)")
}