Refactor to use plugeth-statediff #1
@ -25,16 +25,16 @@ An example config file:
|
|||||||
```toml
|
```toml
|
||||||
[leveldb]
|
[leveldb]
|
||||||
# LevelDB access mode <local | remote>
|
# LevelDB access mode <local | remote>
|
||||||
mode = "local" # LVLDB_MODE
|
mode = "local" # LEVELDB_MODE
|
||||||
|
|
||||||
# in local mode
|
# in local mode
|
||||||
# LevelDB paths
|
# LevelDB paths
|
||||||
path = "/Users/user/Library/Ethereum/geth/chaindata" # LVLDB_PATH
|
path = "/Users/user/Library/Ethereum/geth/chaindata" # LEVELDB_PATH
|
||||||
ancient = "/Users/user/Library/Ethereum/geth/chaindata/ancient" # LVLDB_ANCIENT
|
ancient = "/Users/user/Library/Ethereum/geth/chaindata/ancient" # LEVELDB_ANCIENT
|
||||||
|
|
||||||
# in remote mode
|
# in remote mode
|
||||||
# URL for leveldb-ethdb-rpc endpoint
|
# URL for leveldb-ethdb-rpc endpoint
|
||||||
url = "http://127.0.0.1:8082/" # LVLDB_URL
|
url = "http://127.0.0.1:8082/" # LEVELDB_URL
|
||||||
|
|
||||||
[server]
|
[server]
|
||||||
ipcPath = ".ipc" # SERVICE_IPC_PATH
|
ipcPath = ".ipc" # SERVICE_IPC_PATH
|
||||||
|
16
cmd/env.go
16
cmd/env.go
@ -30,10 +30,10 @@ const (
|
|||||||
|
|
||||||
DB_CACHE_SIZE_MB = "DB_CACHE_SIZE_MB"
|
DB_CACHE_SIZE_MB = "DB_CACHE_SIZE_MB"
|
||||||
TRIE_CACHE_SIZE_MB = "TRIE_CACHE_SIZE_MB"
|
TRIE_CACHE_SIZE_MB = "TRIE_CACHE_SIZE_MB"
|
||||||
LVLDB_MODE = "LVLDB_MODE"
|
LEVELDB_MODE = "LEVELDB_MODE"
|
||||||
LVLDB_PATH = "LVLDB_PATH"
|
LEVELDB_PATH = "LEVELDB_PATH"
|
||||||
LVLDB_ANCIENT = "LVLDB_ANCIENT"
|
LEVELDB_ANCIENT = "LEVELDB_ANCIENT"
|
||||||
LVLDB_URL = "LVLDB_URL"
|
LEVELDB_URL = "LEVELDB_URL"
|
||||||
|
|
||||||
STATEDIFF_PRERUN = "STATEDIFF_PRERUN"
|
STATEDIFF_PRERUN = "STATEDIFF_PRERUN"
|
||||||
STATEDIFF_TRIE_WORKERS = "STATEDIFF_TRIE_WORKERS"
|
STATEDIFF_TRIE_WORKERS = "STATEDIFF_TRIE_WORKERS"
|
||||||
@ -119,10 +119,10 @@ func init() {
|
|||||||
viper.BindEnv("cache.database", DB_CACHE_SIZE_MB)
|
viper.BindEnv("cache.database", DB_CACHE_SIZE_MB)
|
||||||
viper.BindEnv("cache.trie", TRIE_CACHE_SIZE_MB)
|
viper.BindEnv("cache.trie", TRIE_CACHE_SIZE_MB)
|
||||||
|
|
||||||
viper.BindEnv("leveldb.mode", LVLDB_MODE)
|
viper.BindEnv("leveldb.mode", LEVELDB_MODE)
|
||||||
viper.BindEnv("leveldb.path", LVLDB_PATH)
|
viper.BindEnv("leveldb.path", LEVELDB_PATH)
|
||||||
viper.BindEnv("leveldb.ancient", LVLDB_ANCIENT)
|
viper.BindEnv("leveldb.ancient", LEVELDB_ANCIENT)
|
||||||
viper.BindEnv("leveldb.url", LVLDB_URL)
|
viper.BindEnv("leveldb.url", LEVELDB_URL)
|
||||||
|
|
||||||
viper.BindEnv("prom.metrics", PROM_METRICS)
|
viper.BindEnv("prom.metrics", PROM_METRICS)
|
||||||
viper.BindEnv("prom.http", PROM_HTTP)
|
viper.BindEnv("prom.http", PROM_HTTP)
|
||||||
|
Loading…
Reference in New Issue
Block a user