2021-07-07 03:39:56 +02:00
|
|
|
package config
|
|
|
|
|
|
|
|
import (
|
|
|
|
"path/filepath"
|
|
|
|
|
|
|
|
"github.com/lbryio/lbcd/claimtrie/param"
|
|
|
|
btcutil "github.com/lbryio/lbcutil"
|
|
|
|
)
|
|
|
|
|
|
|
|
var DefaultConfig = Config{
|
2022-05-27 06:52:15 +02:00
|
|
|
Params: param.MainNet,
|
|
|
|
RamTrie: true, // as it stands the other trie uses more RAM, more time, and 40GB+ of disk space
|
|
|
|
DebugLevel: "info",
|
|
|
|
DataDir: filepath.Join(btcutil.AppDataDir("lbcd", false), "data"),
|
2021-07-07 03:39:56 +02:00
|
|
|
|
|
|
|
BlockRepoPebble: pebbleConfig{
|
|
|
|
Path: "blocks_pebble_db",
|
|
|
|
},
|
|
|
|
NodeRepoPebble: pebbleConfig{
|
|
|
|
Path: "node_change_pebble_db",
|
|
|
|
},
|
|
|
|
TemporalRepoPebble: pebbleConfig{
|
|
|
|
Path: "temporal_pebble_db",
|
|
|
|
},
|
|
|
|
MerkleTrieRepoPebble: pebbleConfig{
|
|
|
|
Path: "merkletrie_pebble_db",
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
// Config is the container of all configurations.
|
|
|
|
type Config struct {
|
2022-05-27 06:52:15 +02:00
|
|
|
Params param.ClaimTrieParams
|
|
|
|
RamTrie bool
|
|
|
|
DataDir string
|
|
|
|
DebugLevel string
|
2021-07-07 03:39:56 +02:00
|
|
|
|
|
|
|
BlockRepoPebble pebbleConfig
|
|
|
|
NodeRepoPebble pebbleConfig
|
|
|
|
TemporalRepoPebble pebbleConfig
|
|
|
|
MerkleTrieRepoPebble pebbleConfig
|
|
|
|
|
|
|
|
Interrupt <-chan struct{}
|
|
|
|
}
|
|
|
|
|
|
|
|
type pebbleConfig struct {
|
|
|
|
Path string
|
|
|
|
}
|