consts

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: May 30, 2023 License: Apache-2.0 Imports: 3 Imported by: 3

Documentation

Index

Constants

View Source
const (
	// DefaultConfigFile name of config file (toml format)
	DefaultConfigFile = "config.toml"

	// DefaultTempDirName is default name of temporary directory
	DefaultTempDirName = "ibax-temp"

	// DefaultWorkdirName name of working directory
	DefaultWorkdirName = "data"

	// DefaultPidFilename is default filename of pid file
	DefaultPidFilename = "go-ibax.pid"

	// DefaultLockFilename is default filename of lock file
	DefaultLockFilename = "go-ibax.lock"

	// FirstBlockFilename name of first block binary file
	FirstBlockFilename = "1block"

	// PrivateKeyFilename name of wallet private key file
	PrivateKeyFilename = "PrivateKey"

	// PublicKeyFilename name of wallet public key file
	PublicKeyFilename = "PublicKey"

	// NodePrivateKeyFilename name of node private key file
	NodePrivateKeyFilename = "NodePrivateKey"

	// NodePublicKeyFilename name of node public key file
	NodePublicKeyFilename = "NodePublicKey"

	// KeyIDFilename generated KeyID
	KeyIDFilename = "KeyID"
)
View Source
const (
	// RollbackResultFilename rollback result file
	RollbackResultFilename = "rollback_result"

	// FromToPerDayLimit day limit token transfer between accounts
	FromToPerDayLimit = 10000

	// TokenMovementQtyPerBlockLimit block limit token transfer
	TokenMovementQtyPerBlockLimit = 100

	// TCPConnTimeout timeout of tcp connection
	TCPConnTimeout = 5 * time.Second

	// TxRequestExpire is expiration time for request of transaction
	TxRequestExpire = 1 * time.Minute

	// DefaultCLB always is 1
	DefaultCLB = 1

	// MoneyLength is the maximum number of digits in money value
	MoneyLength = 30

	DefaultTokenEcosystem = 1

	// ShiftContractID is the offset of tx identifiers
	ShiftContractID = 5000

	// ContractList is the number of contracts per page on loading
	ContractList = 200

	// Guest key
	GuestPublic  = "" /* 128-byte string literal not displayed */
	GuestKey     = "-110277540701013350"
	GuestAddress = "1833-6466-5330-0853-8266"

	// StatusMainPage is a status for Main Page
	StatusMainPage = `2`

	NoneCLB     = "none"
	DBFindLimit = 10000

	HonorNodeMode     = 1
	CandidateNodeMode = 2
)
View Source
const (
	SavePointMarkBlock = "block"
	SavePointMarkTx    = "tx"
)
View Source
const (
	UTXO_Type_First_Block  = 1 //Initialize the first block
	UTXO_Type_Self_UTXO    = 11
	UTXO_Type_Self_Account = 12
	UTXO_Type_Packaging    = 20
	UTXO_Type_Taxes        = 21
	UTXO_Type_Output       = 22
	UTXO_Type_Combustion   = 23
	UTXO_Type_Transfer     = 26
)
View Source
const (
	NetworkError             = "Network"
	JSONMarshallError        = "JSONMarshall"
	JSONUnmarshallError      = "JSONUnmarshall"
	CommandExecutionError    = "CommandExecution"
	ConversionError          = "Conversion"
	TypeError                = "Type"
	ProtocolError            = "Protocol"
	MarshallingError         = "Marshall"
	UnmarshallingError       = "Unmarshall"
	ParseError               = "Parse"
	IOError                  = "IO"
	CryptoError              = "Crypto"
	ContractError            = "Contract"
	DBError                  = "DB"
	PanicRecoveredError      = "Panic"
	ConnectionError          = "Connection"
	ConfigError              = "Config"
	VMError                  = "VM"
	JustWaiting              = "JustWaiting"
	Ntpdate                  = "Ntpdate"
	BlockError               = "Block"
	ParserError              = "Parser"
	ContextError             = "Context"
	SessionError             = "Session"
	RouteError               = "Route"
	NotFound                 = "NotFound"
	Found                    = "Found"
	EmptyObject              = "EmptyObject"
	InvalidObject            = "InvalidObject"
	DuplicateObject          = "DuplicateObject"
	UnknownObject            = "UnknownObject"
	ParameterExceeded        = "ParameterExceeded"
	DivisionByZero           = "DivisionByZero"
	EvalError                = "Eval"
	JWTError                 = "JWT"
	AccessDenied             = "AccessDenied"
	SizeDoesNotMatch         = "SizeDoesNotMatch"
	NoIndex                  = "NoIndex"
	NoFunds                  = "NoFunds"
	BlockIsFirst             = "BlockIsFirst"
	IncorrectCallingContract = "IncorrectCallingContract"
	WritingFile              = "WritingFile"
	CentrifugoError          = "CentrifugoError"
	StatsdError              = "StatsdError"
	MigrationError           = "MigrationError"
	AutoupdateError          = "AutoupdateError"
	BCRelevanceError         = "BCRelevanceError"
	BCActualizationError     = "BCActualizationError"
	SchedulerError           = "SchedulerError"
	SyncProcess              = "SyncProcess"
	WrongModeError           = "WrongModeError"
	CLBManagerError          = "CLBManagerError"
	TCPClientError           = "TCPClientError"
	BadTxError               = "BadTxError"
	TimeCalcError            = "BlockTimeCounterError"
	RegisterError            = "RegisterError"
	JsonRpcError             = "JsonRpcError"
)

Types of log errors

View Source
const AddressLength = 20

AddressLength is length of address

View Source
const AvailableBCGap = 4
View Source
const BlockSize = 16

BlockSize is size of block

View Source
const BlockVersion = BvIncludeRollbackHash

BlockVersion is block version

View Source
const BvIncludeRollbackHash = 3
View Source
const BvRollbackHash = 2
View Source
const ChainSize = 1 << 20

ChainSize 1M = 1048576 byte

View Source
const DefaultEcosystemName = "platform ecosystem"

DefaultEcosystemName define default ecosystem name

View Source
const DefaultNodesConnectDelay = 6
View Source
const DefaultTcpPort = 7078

DefaultTcpPort used when port number missed in host addr

View Source
const DefaultTokenName = "IBAX Coin"

DefaultTokenName define default token name

View Source
const DefaultTokenSymbol = "IBXC"

DefaultTokenSymbol define default token symbol

View Source
const FounderAmount = 5250000

FounderAmount is the starting amount of founder

View Source
const HashSize = 32

HashSize is size of hash

View Source
const MaxTXAttempt = 10
View Source
const MaxTxBack = 86400

MaxTxBack transaction may wander in the net for a day and then get into a block

View Source
const MaxTxForw = 600

MaxTxForw How fast could the time of transaction pass

View Source
const MinConfirmedNodes = 0

MinConfirmedNodes The number of nodes which should have the same block as we have for regarding this block belongs to the major part of DC-net. For get_confirmed_block_id()

View Source
const MoneyDigits = 12

MoneyDigits is numbers of digits for tokens 1000000000000

View Source
const PrivkeyLength = 32

PrivkeyLength is privkey length

View Source
const PubkeySizeLength = 64

PubkeySizeLength is pubkey length

View Source
const ReadTimeout = 20

ReadTimeout is timeout for TCP

View Source
const RoundFix = 0.00000000001

RoundFix is rounding constant

View Source
const VERSION = "1.4.2"

VERSION is current version

View Source
const WaitConfirmedNodes = 10

WaitConfirmedNodes is used in confirmations

View Source
const WriteTimeout = 20

WriteTimeout is timeout for TCP

Variables

View Source
var ApiPath = `/api/v2/`

ApiPath is the beginning of the api url

View Source
var BuildInfo string

BuildInfo should be defined through -ldflags

View Source
var UsedStopNetworkCerts = [][]byte{}

UsedStopNetworkCerts contains a list of certificates that were used to stop the network

Functions

func SetSavePointMarkBlock

func SetSavePointMarkBlock(idTx string) string

func Version

func Version() string

Types

type LogEventType

type LogEventType int

LogEventType is storing numeric event type

Jump to

Keyboard shortcuts

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