config

package
v0.0.0-...-5a930d7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 13, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultMinRelayTxFee = int64(2e5)

	WalletDbName = "wallet.db"
)

Variables

View Source
var (
	DefaultConfigFile = filepath.Join("./", defaultConfigFilename)
	SampleConfigFile  = filepath.Join("./", sampleConfigFilename)
)
View Source
var ActiveNet = &params.MainNetParams

Functions

func LoadConfig

func LoadConfig(path string) error

Types

type Config

type Config struct {
	ConfigFile string
	AppDataDir string
	DebugLevel string
	LogDir     string
	Create     bool
	Version    bool `short:"V" long:"version" description:"Display version information and exit"`
	Network    string

	//WalletRPC
	UI            bool
	Listeners     []string
	RPCUser       string
	RPCPass       string
	RPCCert       string
	RPCKey        string
	RPCMaxClients int64
	DisableRPC    bool
	DisableTLS    bool
	Confirmations uint32

	// tx fee
	MinTxFee int64

	//walletAPI
	APIs []string

	//Qitmeerd
	QServer        string
	QUser          string
	QPass          string
	QCert          string
	QNoTLS         bool
	QTLSSkipVerify bool
	QProxy         string
	QProxyUser     string
	QProxyPass     string

	WalletPass string `short:"w" long:"wp" description:"Path to configuration file"`

	//qitmeerd RPC
	QitmeerdSelect string
	Qitmeerds      []*client.Config
}

Config wallet config

func NewDefaultConfig

func NewDefaultConfig() (cfg *Config)

NewDefaultConfig make config by default value

func (*Config) Check

func (cfg *Config) Check() error

Check config rule

func (*Config) Save

func (cfg *Config) Save(savePath string) error

Save save cfg to file

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL