config

package
v0.0.0-...-f7c9202 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2018 License: MIT Imports: 8 Imported by: 3

Documentation

Index

Constants

View Source
const Daemonprocesscommandline = "daemonnode"

other internal constant

View Source
const MaxMinNumberTransactionInBlock = 1000

Max and Min number of transactions per block If number of block in a chain is less this umber then it is a minimum. if more then this number is a minimum unmber of TX

View Source
const MaxNumberTransactionInBlock = 10000

Max number of TX per block

View Source
const MinimumBlockBuildingTime = 3 // seconds

========================================================== Testing mode constants we need this for testing purposes. can be set to 0 on production system

View Source
const PidFileName = "server.pid"

File names

View Source
const TargetBits = 16

this defines how strong miming is needed. 16 is simple mining less 5 sec in simple desktop 24 will need 30 seconds in average

View Source
const TargetBits_2 = 24

Variables

This section is empty.

Functions

This section is empty.

Types

type AllPossibleArgs

type AllPossibleArgs struct {
	Address     string
	From        string
	To          string
	Port        int
	Host        string
	NodePort    int
	NodeHost    string
	Genesis     string
	Amount      float64
	LogDest     string
	Transaction string
	View        string
	Clean       bool
}

Thi is the struct with all possible command line arguments

type AppConfig

type AppConfig struct {
	Minter   string
	Port     int
	Host     string
	Nodes    []net.NodeAddr
	Logs     []string
	Database database.DatabaseConfig
}

type AppInput

type AppInput struct {
	Command       string
	MinterAddress string
	Logs          string
	Port          int
	Host          string
	DataDir       string
	Nodes         []net.NodeAddr
	Args          AllPossibleArgs
	Database      database.DatabaseConfig
}

Input summary

func GetAppInput

func GetAppInput() (AppInput, error)

Parses inout and config file. Command line arguments ovverride config file options

func (AppInput) CheckConfigUpdateNeeded

func (c AppInput) CheckConfigUpdateNeeded() bool

func (AppInput) CheckNeedsHelp

func (c AppInput) CheckNeedsHelp() bool

func (AppInput) GetConfig

func (c AppInput) GetConfig() (*AppConfig, error)

func (AppInput) PrintUsage

func (c AppInput) PrintUsage()

func (AppInput) UpdateConfig

func (c AppInput) UpdateConfig() error

Jump to

Keyboard shortcuts

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