Documentation ¶
Index ¶
Constants ¶
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" )
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 )
const ( SavePointMarkBlock = "block" SavePointMarkTx = "tx" )
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 )
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
const AddressLength = 20
AddressLength is length of address
const AvailableBCGap = 4
const BlockSize = 16
BlockSize is size of block
const BlockVersion = BvIncludeRollbackHash
BlockVersion is block version
const BvIncludeRollbackHash = 3
const BvRollbackHash = 2
const ChainSize = 1 << 20
ChainSize 1M = 1048576 byte
const DefaultEcosystemName = "platform ecosystem"
DefaultEcosystemName define default ecosystem name
const DefaultNodesConnectDelay = 6
const DefaultTcpPort = 7078
DefaultTcpPort used when port number missed in host addr
const DefaultTokenName = "IBAX Coin"
DefaultTokenName define default token name
const DefaultTokenSymbol = "IBXC"
DefaultTokenSymbol define default token symbol
const FounderAmount = 5250000
FounderAmount is the starting amount of founder
const HashSize = 32
HashSize is size of hash
const MaxTXAttempt = 10
const MaxTxBack = 86400
MaxTxBack transaction may wander in the net for a day and then get into a block
const MaxTxForw = 600
MaxTxForw How fast could the time of transaction pass
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()
const MoneyDigits = 12
MoneyDigits is numbers of digits for tokens 1000000000000
const PrivkeyLength = 32
PrivkeyLength is privkey length
const PubkeySizeLength = 64
PubkeySizeLength is pubkey length
const ReadTimeout = 20
ReadTimeout is timeout for TCP
const RoundFix = 0.00000000001
RoundFix is rounding constant
const VERSION = "1.4.2"
VERSION is current version
const WaitConfirmedNodes = 10
WaitConfirmedNodes is used in confirmations
const WriteTimeout = 20
WriteTimeout is timeout for TCP
Variables ¶
var ApiPath = `/api/v2/`
ApiPath is the beginning of the api url
var BuildInfo string
BuildInfo should be defined through -ldflags
var UsedStopNetworkCerts = [][]byte{}
UsedStopNetworkCerts contains a list of certificates that were used to stop the network