Documentation ¶
Overview ¶
Methods and types for blockchain entities and interactions.
Index ¶
- Variables
- func GetAllSharders() []string
- func GetBlockWorker() string
- func GetChainID() string
- func GetMaxTxnQuery() int
- func GetMinConfirmation() int
- func GetMinSubmit() int
- func GetMiners() []string
- func GetQuerySleepTime() int
- func GetSharders() []string
- func GetStableMiners() []string
- func PopulateChain(minerjson string, sharderjson string) error
- func PopulateNodes(nodesjson string) ([]string, error)
- func ResetStableMiners()
- func SetBlockWorker(blockWorker string)
- func SetChainID(id string)
- func SetMaxTxnQuery(num int)
- func SetMinConfirmation(minConfirmation int)
- func SetMinSubmit(minSubmit int)
- func SetMiners(minerArray []string)
- func SetQuerySleepTime(time int)
- func SetSharders(sharderArray []string)
- type ChainConfig
- type StakePoolSettings
- type StorageNode
- type UpdateStakePoolSettings
- type UpdateValidationNode
- type ValidationNode
Constants ¶
This section is empty.
Variables ¶
var Sharders *node.NodeHolder
Functions ¶
func GetMinConfirmation ¶
func GetMinConfirmation() int
func GetMinSubmit ¶
func GetMinSubmit() int
func GetQuerySleepTime ¶
func GetQuerySleepTime() int
func GetStableMiners ¶ added in v1.11.0
func GetStableMiners() []string
GetStableMiners get stable miners
func PopulateChain ¶
PopulateChain populate chain from json string
- minerjson is the array of miner urls, serialized as json
- sharderjson is the array of sharder urls, serialized as json
func ResetStableMiners ¶ added in v1.11.0
func ResetStableMiners()
ResetStableMiners reset stable miners to random miners
func SetBlockWorker ¶
func SetBlockWorker(blockWorker string)
func SetChainID ¶
func SetChainID(id string)
func SetMaxTxnQuery ¶
func SetMaxTxnQuery(num int)
SetMaxTxnQuery set max transaction query, maximum number of trials to query a transaction confirmation from sharders.
- num is the number of transaction query
func SetMinConfirmation ¶
func SetMinConfirmation(minConfirmation int)
SetMinConfirmation set minimum confirmation, minimum number of miners to confirm a transaction
- minConfirmation is the minimum confirmation
func SetMinSubmit ¶
func SetMinSubmit(minSubmit int)
SetMinSubmit set minimum submit, minimum number of miners to submit a transaction
- minSubmit is the minimum submit
func SetQuerySleepTime ¶
func SetQuerySleepTime(time int)
SetQuerySleepTime set query sleep time, number of seconds to sleep between each transaction query.
- time is the sleep time
func SetSharders ¶
func SetSharders(sharderArray []string)
Types ¶
type ChainConfig ¶
type StakePoolSettings ¶ added in v1.8.5
type StakePoolSettings struct { DelegateWallet string `json:"delegate_wallet"` NumDelegates int `json:"num_delegates"` ServiceCharge float64 `json:"service_charge"` }
StakePoolSettings information.
type StorageNode ¶
type StorageNode struct { ID string `json:"id"` Baseurl string `json:"url"` // contains filtered or unexported fields }
StorageNode represents a storage node (blobber)
func (*StorageNode) SetSkip ¶
func (sn *StorageNode) SetSkip(t bool)
SetSkip set skip, whether to skip this node in operations or not
- t is the boolean value
type UpdateStakePoolSettings ¶ added in v1.8.17
type UpdateStakePoolSettings struct { DelegateWallet *string `json:"delegate_wallet,omitempty"` NumDelegates *int `json:"num_delegates,omitempty"` ServiceCharge *float64 `json:"service_charge,omitempty"` }
UpdateStakePoolSettings represent stake pool information of a provider node.
type UpdateValidationNode ¶ added in v1.8.17
type UpdateValidationNode struct { ID string `json:"id"` BaseURL *string `json:"url"` StakePoolSettings *UpdateStakePoolSettings `json:"stake_pool_settings"` }
UpdateValidationNode represents a validation node (miner) update
type ValidationNode ¶ added in v1.8.5
type ValidationNode struct { ID string `json:"id"` BaseURL string `json:"url"` StakePoolSettings StakePoolSettings `json:"stake_pool_settings"` }
ValidationNode represents a validation node (miner)