Documentation ¶
Index ¶
- func ParseConfig() (*cfg.Config, error)
- type Details
- type Node
- func (cp *Node) Block(height int64) (*tmctypes.ResultBlock, error)
- func (cp *Node) BlockResults(height int64) (*tmctypes.ResultBlockResults, error)
- func (cp *Node) ConsensusState() (*constypes.RoundStateSimple, error)
- func (cp *Node) Genesis() (*tmctypes.ResultGenesis, error)
- func (cp *Node) LatestHeight() (int64, error)
- func (cp *Node) Stop()
- func (cp *Node) SubscribeEvents(subscriber, query string) (<-chan tmctypes.ResultEvent, context.CancelFunc, error)
- func (cp *Node) SubscribeNewBlocks(subscriber string) (<-chan tmctypes.ResultEvent, context.CancelFunc, error)
- func (cp *Node) Tx(hash string) (*sdk.TxResponse, *tx.Tx, error)
- func (cp *Node) Txs(block *tmctypes.ResultBlock) ([]*types.Tx, error)
- func (cp *Node) Validators(height int64) (*tmctypes.ResultValidators, error)
- type Source
- func (k Source) InitStores() error
- func (k Source) LoadHeight(height int64) (sdk.Context, error)
- func (k Source) RegisterKey(key string) *sdk.KVStoreKey
- func (k Source) RegisterSubspace(moduleName string) paramstypes.Subspace
- func (k Source) RegisterTKey(key string) *sdk.TransientStoreKey
- func (k Source) Type() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseConfig ¶
Types ¶
type Details ¶
type Details struct {
Home string `yaml:"home"`
}
Details represents the nodeconfig.Details implementation for a local node
func DefaultDetails ¶
func DefaultDetails() *Details
func NewDetails ¶
type Node ¶
type Node struct {
// contains filtered or unexported fields
}
Node represents the node implementation that uses a local node
func (*Node) Block ¶
func (cp *Node) Block(height int64) (*tmctypes.ResultBlock, error)
Block implements node.Node
func (*Node) BlockResults ¶
func (cp *Node) BlockResults(height int64) (*tmctypes.ResultBlockResults, error)
BlockResults implements node.Node
func (*Node) ConsensusState ¶
func (cp *Node) ConsensusState() (*constypes.RoundStateSimple, error)
ConsensusState implements node.Node
func (*Node) Genesis ¶
func (cp *Node) Genesis() (*tmctypes.ResultGenesis, error)
Genesis implements node.Node
func (*Node) LatestHeight ¶
LatestHeight implements node.Node
func (*Node) SubscribeEvents ¶
func (cp *Node) SubscribeEvents(subscriber, query string) (<-chan tmctypes.ResultEvent, context.CancelFunc, error)
SubscribeEvents implements node.Node
func (*Node) SubscribeNewBlocks ¶
func (cp *Node) SubscribeNewBlocks(subscriber string) (<-chan tmctypes.ResultEvent, context.CancelFunc, error)
SubscribeNewBlocks implements node.Node
func (*Node) Validators ¶
func (cp *Node) Validators(height int64) (*tmctypes.ResultValidators, error)
Validators implements node.Node
type Source ¶
type Source struct { Initialized bool StoreDB db.DB Codec codec.Marshaler LegacyAmino *codec.LegacyAmino BlockStore *tmstore.BlockStore Logger log.Logger Cms sdk.CommitMultiStore Keys map[string]*sdk.KVStoreKey TKeys map[string]*sdk.TransientStoreKey ParamsKeeper paramskeeper.Keeper }
Source represents the Source interface implementation that reads the data from a local node
func NewSource ¶
func NewSource(home string, encodingConfig *params.EncodingConfig) (*Source, error)
NewSource returns a new Source instance
func (Source) InitStores ¶
InitStores initializes the stores by mounting the various keys that have been specified
func (Source) LoadHeight ¶
LoadHeight loads the given height from the store. It returns a new Context that can be used to query the data, or an error if something wrong happens.
func (Source) RegisterKey ¶
func (k Source) RegisterKey(key string) *sdk.KVStoreKey
func (Source) RegisterSubspace ¶
func (k Source) RegisterSubspace(moduleName string) paramstypes.Subspace
func (Source) RegisterTKey ¶
func (k Source) RegisterTKey(key string) *sdk.TransientStoreKey