Documentation ¶
Index ¶
Constants ¶
View Source
const ( // DefaultMinSubmit default value for min_submit DefaultMinSubmit = 50 // DefaultMinConfirmation default value for min_confirmation DefaultMinConfirmation = 50 // DefaultMaxTxnQuery default value for max_txn_query DefaultMaxTxnQuery = 5 // DefaultConfirmationChainLength default value for confirmation_chain_length DefaultConfirmationChainLength = 3 // DefaultQuerySleepTime default value for query_sleep_time DefaultQuerySleepTime = 5 )
Variables ¶
View Source
var ( // ErrMssingConfig config file is missing ErrMssingConfig = errors.New("[conf]missing config file") // ErrInvalidValue invalid value in config ErrInvalidValue = errors.New("[conf]invalid value") // ErrBadParsing fail to parse config via spf13/viper ErrBadParsing = errors.New("[conf]bad parsing") )
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // BlockWorker the url of 0dns's network api BlockWorker string // PreferredBlobbers preferred blobbers on new allocation PreferredBlobbers []string // MinSubmit mininal submit from blobber MinSubmit int // MinConfirmation mininal confirmation from sharders MinConfirmation int // CconfirmationChainLength minial confirmation chain length ConfirmationChainLength int // additional settings depending network latency // MaxTxnQuery maximum transcation query from sharders MaxTxnQuery int // QuerySleepTime sleep time before transcation query QuerySleepTime int // SignatureScheme signature scheme SignatureScheme string // ChainID which blockchain it is working ChainID string }
Config settings from ~/.zcn/config.yaml block_worker: http://198.18.0.98:9091 signature_scheme: bls0chain min_submit: 50 min_confirmation: 50 confirmation_chain_length: 3 max_txn_query: 5 query_sleep_time: 5 # # OPTIONAL - Uncomment to use/ Add more if you want # preferred_blobbers: # - http://one.devnet-0chain.net:31051 # - http://one.devnet-0chain.net:31052 # - http://one.devnet-0chain.net:31053
func LoadConfigFile ¶
LoadConfigFile load and parse Config from file
Click to show internal directories.
Click to hide internal directories.