-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathvars.go
More file actions
25 lines (20 loc) · 991 Bytes
/
vars.go
File metadata and controls
25 lines (20 loc) · 991 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// Package vars contains global variables and configuration
package vars
import (
"os"
"github.com/flashbots/go-utils/cli"
relaycommon "github.com/flashbots/mev-boost-relay/common"
)
var (
Version = "dev" // is set during build process
LogDebug = os.Getenv("DEBUG") != ""
LogJSON = os.Getenv("LOG_JSON") != ""
Genesis = 1_606_824_023 // mainnet default, overwritten by config file
DefaultBeaconURI = relaycommon.GetEnv("BEACON_URI", "http://localhost:3500")
DefaultPostgresDSN = relaycommon.GetEnv("POSTGRES_DSN", "postgres://postgres:postgres@localhost:5432/postgres?sslmode=disable")
DefaultLogLevel = relaycommon.GetEnv("LOG_LEVEL", "info")
DefaultEthNodeURI = relaycommon.GetEnv("ETH_NODE_URI", "")
DefaultEthBackupNodeURI = relaycommon.GetEnv("ETH_NODE_BACKUP_URI", "")
DefaultBackfillRunnerInterval = cli.GetEnvInt("BACKFILL_RUNNER_INTERVAL_MIN", 5)
DefaultBackfillRunnerNumThreads = cli.GetEnvInt("BACKFILL_RUNNER_NUM_THREADS", 10)
)