local

package
v2.0.0-...-6878c7e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 18, 2021 License: CC0-1.0 Imports: 40 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseConfig

func ParseConfig() (*cfg.Config, error)

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

func NewDetails(home string) *Details

func (*Details) Validate

func (d *Details) Validate() error

Validate implements nodeconfig.Details

type Node

type Node struct {
	// contains filtered or unexported fields
}

Node represents the node implementation that uses a local node

func NewNode

func NewNode(config *Details, txConfig client.TxConfig) (*Node, error)

NewNode returns a new Node instance

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

func (cp *Node) LatestHeight() (int64, error)

LatestHeight implements node.Node

func (*Node) Stop

func (cp *Node) Stop()

Stop 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) Tx

func (cp *Node) Tx(hash string) (*sdk.TxResponse, *tx.Tx, error)

Tx implements node.Node

func (*Node) Txs

func (cp *Node) Txs(block *tmctypes.ResultBlock) ([]*types.Tx, error)

Txs 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

func (k Source) InitStores() error

InitStores initializes the stores by mounting the various keys that have been specified

func (Source) LoadHeight

func (k Source) LoadHeight(height int64) (sdk.Context, error)

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

func (Source) Type

func (k Source) Type() string

Type implements keeper.Source

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL