config

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2022 License: MIT Imports: 8 Imported by: 2

Documentation

Index

Constants

View Source
const (

	// DecimalVersion is integer version of the Decimal app.
	DecimalVersion = "1.4.0"

	// DecimalMainPrefix is the main prefix for all keys and addresses.
	DecimalMainPrefix = "dx"

	// PrefixValidator is the prefix for validator keys.
	PrefixValidator = "val"
	// PrefixConsensus is the prefix for consensus keys.
	PrefixConsensus = "cons"
	// PrefixPublic is the prefix for public keys.
	PrefixPublic = "pub"
	// PrefixOperator is the prefix for operator keys.
	PrefixOperator = "oper"

	// DecimalPrefixAccAddr defines the Decimal prefix of an account's address.
	DecimalPrefixAccAddr = DecimalMainPrefix
	// DecimalPrefixAccPub defines the Decimal prefix of an account's public key.
	DecimalPrefixAccPub = DecimalMainPrefix + PrefixPublic
	// DecimalPrefixValAddr defines the Decimal prefix of a validator's operator address.
	DecimalPrefixValAddr = DecimalMainPrefix + PrefixValidator + PrefixOperator
	// DecimalPrefixValPub defines the Decimal prefix of a validator's operator public key.
	DecimalPrefixValPub = DecimalMainPrefix + PrefixValidator + PrefixOperator + PrefixPublic
	// DecimalPrefixConsAddr defines the Decimal prefix of a consensus node address.
	DecimalPrefixConsAddr = DecimalMainPrefix + PrefixValidator + PrefixConsensus
	// DecimalPrefixConsPub defines the Decimal prefix of a consensus node public key.
	DecimalPrefixConsPub = DecimalMainPrefix + PrefixValidator + PrefixConsensus + PrefixPublic

	TitleTestBaseCoin  = "Test decimal coin"
	SymbolTestBaseCoin = "tdel"
	TitleBaseCoin      = "Decimal coin"
	SymbolBaseCoin     = "del"
)
View Source
const (
	OneHour     = 360 // blocks
	UpdatesName = "updates.json"
	GracePeriod = OneHour * 24 * 182 // grace period to use inside inGracePeriod
)

Variables

View Source
var (
	DataPath  = fmt.Sprintf("%s/.decimal/daemon/data", os.Getenv("HOME"))
	NameFiles = []string{"decd", "deccli"}
)
View Source
var (
	InitialVolumeTestBaseCoin, _ = sdk.NewIntFromString("340000000000000000000000000")
	InitialVolumeBaseCoin, _     = sdk.NewIntFromString("340000000000000000000000000")
)
View Source
var ChainID = "decimal-testnet-07-31-22-30"

Functions

This section is empty.

Types

type Config

type Config struct {
	Initialized           bool    `json:"initialized" yaml:"initialized"`
	TitleBaseCoin         string  `json:"title" yaml:"title"`   // Full coin title (Bitcoin)
	SymbolBaseCoin        string  `json:"symbol" yaml:"symbol"` // Short coin title (BTC)
	InitialVolumeBaseCoin sdk.Int `json:"initial_volume" yaml:"initial_volume"`
}

func GetDefaultConfig

func GetDefaultConfig(chainId string) *Config

type UpdatesInfoStruct added in v1.2.12

type UpdatesInfoStruct struct {
	LastBlock int64            `json:"last_update"` // last height of 'software_upgrade'
	AllBlocks map[string]int64 `json:"all_updates"` // map of executed upgrades. key - plan name, value - height
	// contains filtered or unexported fields
}

func NewUpdatesInfo

func NewUpdatesInfo(planfile string) *UpdatesInfoStruct

func (*UpdatesInfoStruct) AddExecutedPlan added in v1.2.12

func (plan *UpdatesInfoStruct) AddExecutedPlan(planName string, planHeight int64)

func (*UpdatesInfoStruct) Load added in v1.2.12

func (plan *UpdatesInfoStruct) Load() error

func (*UpdatesInfoStruct) PushNewPlanHeight added in v1.2.12

func (plan *UpdatesInfoStruct) PushNewPlanHeight(planHeight int64)

func (*UpdatesInfoStruct) Save added in v1.2.12

func (plan *UpdatesInfoStruct) Save() error

Jump to

Keyboard shortcuts

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