logic

package
v0.0.32 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2021 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DrySend

func DrySend(keepers core.Keepers, allowNonceGap bool, sender interface{}, value, fee util.String, nonce, chainHeight uint64) error

DrySend checks whether the given sender can execute the transaction

sender can be an address, identifier.Address or *crypto.PubKey

Types

type Logic

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

Logic is the central point for defining and accessing and modifying different type of state.

func New

func New(db storagetypes.Engine, stateTreeDB tmdb.DB, cfg *config.AppConfig) *Logic

New creates an instance of Logic PANICS: If unable to load state tree

func NewAtomic

func NewAtomic(db storagetypes.Engine, stateTreeDB tmdb.DB, cfg *config.AppConfig) *Logic

NewAtomic creates an instance of Logic that supports atomic database operations across all keepers and logic providers.

func (*Logic) AccountKeeper

func (l *Logic) AccountKeeper() core.AccountKeeper

AccountKeeper returns the account keeper

func (*Logic) ApplyGenesisState

func (l *Logic) ApplyGenesisState(genState json.RawMessage) error

WriteGenesisState creates initial state objects from the genesis file

func (*Logic) ApplyProposals added in v0.0.29

func (l *Logic) ApplyProposals(block *state.BlockInfo) error

ApplyProposals applies proposals ending at the given block.

func (*Logic) Commit

func (l *Logic) Commit() error

Commit the state tree, database transaction and other processes that needs to be finalized after a new tree version is saved. NOTE: The operations are not all atomic.

func (*Logic) Config

func (l *Logic) Config() *config.AppConfig

Cfg returns the application config

func (*Logic) DB

func (l *Logic) DB() storagetypes.Engine

DB returns the hubs db reference

func (*Logic) DHTKeeper

func (l *Logic) DHTKeeper() core.DHTKeeper

DHTKeeper returns the DHT keeper

func (*Logic) Discard

func (l *Logic) Discard()

Discard the underlying transaction and renew it. Also rollback any uncommitted tree modifications.

func (*Logic) DrySend

func (l *Logic) DrySend(sender interface{}, value, fee util.String, nonce uint64,
	allowNonceGap bool, chainHeight uint64) error

DrySend checks whether the given sender can execute the transaction

sender can be an address, identifier.Address or *crypto.PubKey. value is the amount to transfer out of the sender account. fee is the amount of coins to pay for network fee. nonce is the sending account next nonce allowNonceGap allows current nonce and next nonce to have a difference > 1 chainHeight is the block height to query the account from.

func (*Logic) ExecTx

func (l *Logic) ExecTx(args *core.ExecArgs) abcitypes.ResponseDeliverTx

ExecTx executes a transaction. chainHeight: The height of the block chain

func (*Logic) GetDBTx

func (l *Logic) GetDBTx() storagetypes.Tx

GetDBTx returns the db transaction used by the logic providers and keepers

func (*Logic) GetMempoolReactor

func (l *Logic) GetMempoolReactor() core.MempoolReactor

GetMempoolReactor returns the mempool reactor

func (*Logic) GetRemoteServer

func (l *Logic) GetRemoteServer() core.RemoteServer

GetRemoteServer returns the repository manager

func (*Logic) GetTicketManager

func (l *Logic) GetTicketManager() tickettypes.TicketManager

GetTicketManager returns the ticket manager

func (*Logic) NamespaceKeeper

func (l *Logic) NamespaceKeeper() core.NamespaceKeeper

NamespaceKeeper returns the namespace keeper

func (*Logic) OnEndBlock

func (l *Logic) OnEndBlock(block *state.BlockInfo) error

OnEndBlock is called within the ABCI EndBlock method; Do things that need to happen after each block transactions are processed; Note: The ABCI will panic if an error is returned.

func (*Logic) PushKeyKeeper

func (l *Logic) PushKeyKeeper() core.PushKeyKeeper

PushKeyKeeper returns the push key keeper

func (*Logic) RepoKeeper

func (l *Logic) RepoKeeper() core.RepoKeeper

RepoKeeper returns the repo keeper

func (*Logic) RepoSyncInfoKeeper

func (l *Logic) RepoSyncInfoKeeper() core.RepoSyncInfoKeeper

RepoSyncInfoKeeper returns the track list keeper

func (*Logic) SetMempoolReactor

func (l *Logic) SetMempoolReactor(mr core.MempoolReactor)

SetMempoolReactor sets the mempool reactor

func (*Logic) SetRemoteServer

func (l *Logic) SetRemoteServer(m core.RemoteServer)

SetRemoteServer sets the repository manager

func (*Logic) SetTicketManager

func (l *Logic) SetTicketManager(tm tickettypes.TicketManager)

SetTicketManager sets the ticket manager

func (*Logic) StateTree

func (l *Logic) StateTree() tree.Tree

StateTree returns the state tree

func (*Logic) SysKeeper

func (l *Logic) SysKeeper() core.SystemKeeper

SysKeeper returns the system keeper

func (*Logic) Validator

func (l *Logic) Validator() core.ValidatorLogic

Validator returns the validator logic

func (*Logic) ValidatorKeeper

func (l *Logic) ValidatorKeeper() core.ValidatorKeeper

ValidatorKeeper returns the validator keeper

type Validator

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

Validator implements types.ValidatorLogic. Provides functionalities for managing and deriving validators.

func (*Validator) Index

func (v *Validator) Index(height int64, valUpdates []abcitypes.ValidatorUpdate) error

Index indexes the validator set for the given height.

Jump to

Keyboard shortcuts

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