Documentation ¶
Index ¶
- Constants
- func DuplicateHonorNode(fn []*HonorNode) error
- func GetAccessExec(s string) string
- func GetCountOfActiveNodes() int64
- func GetDefaultRemoteHosts() []string
- func GetFirstBlockData() (*types.FirstBlock, error)
- func GetFirstBlockTimestamp() int64
- func GetFuelRate(ecosystem int64) string
- func GetGapsBetweenBlocks() int64
- func GetHonorNodeType() bool
- func GetIncorrectBlocksPerDay() int
- func GetLocalNodeBanTime() time.Duration
- func GetMaxBlockFuel() int64
- func GetMaxBlockGenerationTime() int64
- func GetMaxBlockSize() int64
- func GetMaxBlockTimeDuration() time.Duration
- func GetMaxBlockUserTx() int
- func GetMaxColumns() int
- func GetMaxCost() int64
- func GetMaxForsignSize() int64
- func GetMaxIndexes() int
- func GetMaxTxCount() int
- func GetMaxTxFuel() int64
- func GetMaxTxSize() int64
- func GetNodeBanTime() time.Duration
- func GetNodeHostByPosition(position int64) (string, error)
- func GetNodePositionByPublicKey(publicKey []byte) (int64, error)
- func GetNodePrivKey() []byte
- func GetNodePubKey() []byte
- func GetNodePublicKeyByPosition(position int64) ([]byte, error)
- func GetNumberOfNodes() int64
- func GetNumberOfNodesFromDB(transaction *sqldb.DbTransaction) int64
- func GetPriceCreateExec(s string) (price int64)
- func GetPriceExec(s string) (price int64, ok bool)
- func GetRbBlocks1() int64
- func GetRemoteHosts() []string
- func GetSizeFuel() int64
- func GetSysParCache() map[string]string
- func GetTableColType() []map[string]string
- func GetTaxesWallet(ecosystem int64) string
- func GetThisNodePosition() (int64, error)
- func HasFuelRate(ecosystem int64) (string, bool)
- func HasSys(name string) bool
- func HasTaxesWallet(ecosystem int64) (string, bool)
- func IsByteColumn(table, column string) bool
- func IsCandidateNodeMode() bool
- func IsHonorNodeMode() bool
- func IsPrivateBlockchain() bool
- func IsTestMode() bool
- func ReadNodeKeys() (err error)
- func SetFirstBlockData(data *types.FirstBlock)
- func SetFirstBlockTimestamp(data int64)
- func SetRunModel(setVal uint8)
- func SysInt(name string) int
- func SysInt64(name string) int64
- func SysString(name string) string
- func SysTableColType(dbTx *sqldb.DbTransaction) error
- func SysUpdate(dbTx *sqldb.DbTransaction) error
- type HonorNode
Constants ¶
const ( // NumberNodes is the number of nodes NumberNodes = `number_of_nodes` // FuelRate is the rate FuelRate = `fuel_rate` // HonorNodes is the list of nodes HonorNodes = `honor_nodes` // GapsBetweenBlocks is the time between blocks GapsBetweenBlocks = `gap_between_blocks` // MaxBlockSize is the maximum size of the block MaxBlockSize = `max_block_size` // MaxTxSize is the maximum size of the transaction MaxTxSize = `max_tx_size` // MaxForsignSize is the maximum size of the forsign of transaction MaxForsignSize = `max_forsign_size` // MaxBlockFuel is the maximum fuel of the block MaxBlockFuel = `max_fuel_block` // MaxTxFuel is the maximum fuel of the transaction MaxTxFuel = `max_fuel_tx` // MaxTxCount is the maximum count of the transactions MaxTxCount = `max_tx_block` // MaxBlockGenerationTime is the time limit for block generation (in ms) MaxBlockGenerationTime = `max_block_generation_time` // MaxColumns is the maximum columns in tables MaxColumns = `max_columns` // MaxIndexes is the maximum indexes in tables MaxIndexes = `max_indexes` // MaxBlockUserTx is the maximum number of user's transactions in one block MaxBlockUserTx = `max_tx_block_per_user` // SizeFuel is the fuel cost of 1024 bytes of the transaction data SizeFuel = `price_tx_data` // TaxesWallet is the address for taxess TaxesWallet = `taxes_wallet` // RbBlocks1 rollback from queue_bocks RbBlocks1 = `rollback_blocks` // BlockReward value of reward, which is chrged on block generation BlockReward = "block_reward" // IncorrectBlocksPerDay is value of incorrect blocks per day before global ban IncorrectBlocksPerDay = `incorrect_blocks_per_day` // NodeBanTime is value of ban time for bad nodes (in ms) NodeBanTime = `node_ban_time` // LocalNodeBanTime is value of local ban time for bad nodes (in ms) LocalNodeBanTime = `local_node_ban_time` // TaxesSize is the value of the taxes TaxesSize = `taxes_size` // PriceTxSize is the size of a user's resource in the database PriceTxSize = `price_tx_size` // PriceCreateRate is new element rate, include table,contract,column,ecosystem,page,menu PriceCreateRate = `price_create_rate` // Test equals true or 1 if we have a test blockchain Test = `test` // PrivateBlockchain is value defining blockchain mode PrivateBlockchain = `private_blockchain` // CostDefault is the default maximum cost of F CostDefault = int64(20000000) PriceExec = "price_exec_" AccessExec = "access_exec_" PriceCreateExec = "price_create_exec_" PayFreeContract = "pay_free_contract" )
Variables ¶
This section is empty.
Functions ¶
func DuplicateHonorNode ¶
func GetAccessExec ¶
func GetCountOfActiveNodes ¶
func GetCountOfActiveNodes() int64
GetCountOfActiveNodes is count of nodes with stopped = false
func GetDefaultRemoteHosts ¶
func GetDefaultRemoteHosts() []string
GetRemoteHosts returns array of hostnames excluding myself
func GetFirstBlockData ¶
func GetFirstBlockData() (*types.FirstBlock, error)
GetFirstBlockData gets data of first block from global variable
func GetFirstBlockTimestamp ¶
func GetFirstBlockTimestamp() int64
func GetGapsBetweenBlocks ¶
func GetGapsBetweenBlocks() int64
GetGapsBetweenBlocks is returns gaps between blocks
func GetHonorNodeType ¶
func GetHonorNodeType() bool
func GetIncorrectBlocksPerDay ¶
func GetIncorrectBlocksPerDay() int
func GetLocalNodeBanTime ¶
func GetMaxBlockGenerationTime ¶
func GetMaxBlockGenerationTime() int64
GetMaxBlockGenerationTime is returns max block generation time (in ms)
func GetMaxBlockTimeDuration ¶
GetMaxBlockTimeDuration return max block time duration
func GetMaxBlockUserTx ¶
func GetMaxBlockUserTx() int
GetMaxBlockUserTx is returns max tx block user
func GetMaxCost ¶
func GetMaxCost() int64
func GetMaxForsignSize ¶
func GetMaxForsignSize() int64
GetMaxTxTextSize is returns max tx text size
func GetNodeBanTime ¶
func GetNodeHostByPosition ¶
GetNodeHostByPosition is retrieving node host by position
func GetNodePositionByPublicKey ¶
GetNodePositionByKeyID is returning node position by key id
func GetNodePrivKey ¶
func GetNodePrivKey() []byte
func GetNodePubKey ¶
func GetNodePubKey() []byte
func GetNodePublicKeyByPosition ¶
GetNodePublicKeyByPosition is retrieving node public key by position
func GetNumberOfNodesFromDB ¶
func GetNumberOfNodesFromDB(transaction *sqldb.DbTransaction) int64
func GetPriceCreateExec ¶
func GetPriceExec ¶
func GetRemoteHosts ¶
func GetRemoteHosts() []string
GetRemoteHosts returns array of hostnames excluding myself
func GetSysParCache ¶
func GetTableColType ¶
func GetTaxesWallet ¶
GetTaxesWallet is returns taxes wallet
func GetThisNodePosition ¶
func HasFuelRate ¶
HasFuelRate is returns fuels exist
func HasTaxesWallet ¶
HasTaxesWallet is returns taxes exist
func IsByteColumn ¶
func IsCandidateNodeMode ¶
func IsCandidateNodeMode() bool
func IsHonorNodeMode ¶
func IsHonorNodeMode() bool
func IsPrivateBlockchain ¶
func IsPrivateBlockchain() bool
IsPrivateBlockchain returns the value of private_blockchain system parameter or true
func IsTestMode ¶
func IsTestMode() bool
func ReadNodeKeys ¶
func ReadNodeKeys() (err error)
func SetFirstBlockData ¶
func SetFirstBlockData(data *types.FirstBlock)
SetFirstBlockData sets data of first block to global variable
func SetFirstBlockTimestamp ¶
func SetFirstBlockTimestamp(data int64)
func SetRunModel ¶
func SetRunModel(setVal uint8)
func SysTableColType ¶
func SysTableColType(dbTx *sqldb.DbTransaction) error
SysTableColType reloads/updates values of all ecosystem table column data type
func SysUpdate ¶
func SysUpdate(dbTx *sqldb.DbTransaction) error
SysUpdate reloads/updates values of platform parameters
Types ¶
type HonorNode ¶
type HonorNode struct { TCPAddress string APIAddress string PublicKey []byte UnbanTime time.Time Stopped bool }
HonorNode is storing honor node data
func GetNodeByHost ¶
func GetNodeByPosition ¶
GetNodeByPosition is retrieving node by position
func (*HonorNode) MarshalJSON ¶
func (*HonorNode) UnmarshalJSON ¶
UnmarshalJSON is custom json unmarshaller