github.com/lbryio/lbcd@v0.22.119/claimtrie/config/config.go (about)

     1  package config
     2  
     3  import (
     4  	"path/filepath"
     5  
     6  	"github.com/lbryio/lbcd/claimtrie/param"
     7  	btcutil "github.com/lbryio/lbcutil"
     8  )
     9  
    10  var DefaultConfig = Config{
    11  	Params:     param.MainNet,
    12  	RamTrie:    true, // as it stands the other trie uses more RAM, more time, and 40GB+ of disk space
    13  	DebugLevel: "info",
    14  	DataDir:    filepath.Join(btcutil.AppDataDir("lbcd", false), "data"),
    15  
    16  	BlockRepoPebble: pebbleConfig{
    17  		Path: "blocks_pebble_db",
    18  	},
    19  	NodeRepoPebble: pebbleConfig{
    20  		Path: "node_change_pebble_db",
    21  	},
    22  	TemporalRepoPebble: pebbleConfig{
    23  		Path: "temporal_pebble_db",
    24  	},
    25  	MerkleTrieRepoPebble: pebbleConfig{
    26  		Path: "merkletrie_pebble_db",
    27  	},
    28  }
    29  
    30  // Config is the container of all configurations.
    31  type Config struct {
    32  	Params     param.ClaimTrieParams
    33  	RamTrie    bool
    34  	DataDir    string
    35  	DebugLevel string
    36  
    37  	BlockRepoPebble      pebbleConfig
    38  	NodeRepoPebble       pebbleConfig
    39  	TemporalRepoPebble   pebbleConfig
    40  	MerkleTrieRepoPebble pebbleConfig
    41  
    42  	Interrupt <-chan struct{}
    43  }
    44  
    45  type pebbleConfig struct {
    46  	Path string
    47  }