Documentation ¶
Index ¶
- type BlockExecutor
- func (e *BlockExecutor) Commit(ctx context.Context, state *types.State, block *types.Block, ...) (int64, error)
- func (e *BlockExecutor) CreateBlock(height uint64, lastCommit *types.Commit, lastHeaderHash [32]byte, ...) *types.Block
- func (e *BlockExecutor) Execute(ctx context.Context, state types.State, block *types.Block) (*tmstate.ABCIResponses, error)
- func (e *BlockExecutor) GetAppInfo() (*abcitypes.ResponseInfo, error)
- func (e *BlockExecutor) InitChain(genesis *tmtypes.GenesisDoc, validators []*tmtypes.Validator) (*abci.ResponseInitChain, error)
- func (e *BlockExecutor) UpdateStateFromResponses(resp *tmstate.ABCIResponses, state types.State, block *types.Block) (types.State, error)
- func (e *BlockExecutor) Validate(state types.State, block *types.Block, commit *types.Commit, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlockExecutor ¶
type BlockExecutor struct {
// contains filtered or unexported fields
}
BlockExecutor creates and applies blocks and maintains state.
func NewBlockExecutor ¶
func NewBlockExecutor(proposerAddress []byte, namespaceID string, chainID string, mempool mempool.Mempool, proxyApp proxy.AppConns, eventBus *tmtypes.EventBus, logger log.Logger) (*BlockExecutor, error)
NewBlockExecutor creates new instance of BlockExecutor. Proposer address and namespace ID will be used in all newly created blocks.
func (*BlockExecutor) Commit ¶
func (e *BlockExecutor) Commit(ctx context.Context, state *types.State, block *types.Block, resp *tmstate.ABCIResponses) (int64, error)
Commit commits the block
func (*BlockExecutor) CreateBlock ¶
func (e *BlockExecutor) CreateBlock(height uint64, lastCommit *types.Commit, lastHeaderHash [32]byte, state types.State) *types.Block
CreateBlock reaps transactions from mempool and builds a block.
func (*BlockExecutor) Execute ¶
func (e *BlockExecutor) Execute(ctx context.Context, state types.State, block *types.Block) (*tmstate.ABCIResponses, error)
Execute executes the block and returns the ABCIResponses.
func (*BlockExecutor) GetAppInfo ¶
func (e *BlockExecutor) GetAppInfo() (*abcitypes.ResponseInfo, error)
GetAppInfo returns the latest AppInfo from the proxyApp.
func (*BlockExecutor) InitChain ¶
func (e *BlockExecutor) InitChain(genesis *tmtypes.GenesisDoc, validators []*tmtypes.Validator) (*abci.ResponseInitChain, error)
InitChain calls InitChainSync using consensus connection to app.
func (*BlockExecutor) UpdateStateFromResponses ¶
func (e *BlockExecutor) UpdateStateFromResponses(resp *tmstate.ABCIResponses, state types.State, block *types.Block) (types.State, error)
UpdateStateFromResponses updates state based on the ABCIResponses.
Click to show internal directories.
Click to hide internal directories.