Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
ChainID string `mapstructure:"chain-id"` // ChainID of the target chain
NodeURI string `mapstructure:"node"` // Remote RPC URI of BandChain node to connect to
Granter string `mapstructure:"granter"` // The granter address
GasPrices string `mapstructure:"gas-prices"` // Gas prices of the transaction
LogLevel string `mapstructure:"log-level"` // Log level of the logger
BroadcastTimeout time.Duration `mapstructure:"broadcast-timeout"` // The time that cylinder will wait for tx commit
RPCPollInterval time.Duration `mapstructure:"rpc-poll-interval"` // The duration of rpc poll interval
MaxTry uint64 `mapstructure:"max-try"` // The maximum number of tries to submit a report transaction
GasAdjustStart float64 `mapstructure:"gas-adjust-start"` // The start value of gas adjustment
GasAdjustStep float64 `mapstructure:"gas-adjust-step"` // The increment step of gas adjustment
RandomSecret tss.Scalar `mapstructure:"random-secret"` // The secret value that is used for random D,E
CheckDEInterval time.Duration `mapstructure:"check-de-interval"` // The interval for updating DE
CheckStatusInterval time.Duration `mapstructure:"check-status-interval"` // The interval for checking the status of the member
MetricsListenAddr string `mapstructure:"metrics-listen-addr"` // Address to use for metrics server
}
Config data structure for Cylinder process.
type Context ¶
type Context struct {
Config *Config
Keyring keyring.Keyring
Home string
Cdc codec.Codec // Codec for serialization.
TxConfig client.TxConfig // Transaction configuration.
InterfaceRegistry types.InterfaceRegistry // Interface registry for protobuf types.
Logger *logger.Logger
ErrCh chan error
PriorityMsgRequestCh chan msg.Request
MsgRequestCh chan msg.Request
DataDir string
Store *store.Store
}
Context holds the context information for the Cylinder process.
func NewContext ¶
func NewContext( cfg *Config, kr keyring.Keyring, home string, cdc codec.Codec, txConfig client.TxConfig, interfaceRegistry types.InterfaceRegistry, ) (*Context, error)
NewContext creates a new instance of the Context.
func (*Context) WithGoLevelDB ¶
WithGoLevelDB initializes the database of the context with GoLevelDB.
Click to show internal directories.
Click to hide internal directories.