mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-24 10:11:48 +00:00
s/ExecBlock/ValExecBlock/g; s/sm.ApplyBlock/sm.ExecCommitBlock/g
This commit is contained in:
@ -16,10 +16,10 @@ import (
|
||||
//--------------------------------------------------
|
||||
// Execute the block
|
||||
|
||||
// ExecBlock executes the block, but does NOT mutate State.
|
||||
// ValExecBlock executes the block, but does NOT mutate State.
|
||||
// + validates the block
|
||||
// + executes block.Txs on the proxyAppConn
|
||||
func (s *State) ExecBlock(eventCache types.Fireable, proxyAppConn proxy.AppConnConsensus, block *types.Block) (*ABCIResponses, error) {
|
||||
func (s *State) ValExecBlock(eventCache types.Fireable, proxyAppConn proxy.AppConnConsensus, block *types.Block) (*ABCIResponses, error) {
|
||||
// Validate the block.
|
||||
if err := s.validateBlock(block); err != nil {
|
||||
return nil, ErrInvalidBlock(err)
|
||||
@ -201,15 +201,15 @@ func (s *State) validateBlock(block *types.Block) error {
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// ApplyBlock executes the block, updates state w/ ABCI responses,
|
||||
// ApplyBlock validates & executes the block, updates state w/ ABCI responses,
|
||||
// then commits and updates the mempool atomically, then saves state.
|
||||
// Transaction results are optionally indexed.
|
||||
|
||||
// Execute and commit block against app, save block and state
|
||||
// Validate, execute, and commit block against app, save block and state
|
||||
func (s *State) ApplyBlock(eventCache types.Fireable, proxyAppConn proxy.AppConnConsensus,
|
||||
block *types.Block, partsHeader types.PartSetHeader, mempool types.Mempool) error {
|
||||
|
||||
abciResponses, err := s.ExecBlock(eventCache, proxyAppConn, block)
|
||||
abciResponses, err := s.ValExecBlock(eventCache, proxyAppConn, block)
|
||||
if err != nil {
|
||||
return fmt.Errorf("Exec failed for application: %v", err)
|
||||
}
|
||||
@ -285,9 +285,9 @@ func (s *State) indexTxs(abciResponses *ABCIResponses) {
|
||||
s.TxIndexer.Batch(batch)
|
||||
}
|
||||
|
||||
// Apply and commit a block on the proxyApp without validating or mutating the state
|
||||
// Exec and commit a block on the proxyApp without validating or mutating the state
|
||||
// Returns the application root hash (result of abci.Commit)
|
||||
func ApplyBlock(appConnConsensus proxy.AppConnConsensus, block *types.Block) ([]byte, error) {
|
||||
func ExecCommitBlock(appConnConsensus proxy.AppConnConsensus, block *types.Block) ([]byte, error) {
|
||||
var eventCache types.Fireable // nil
|
||||
_, err := execBlockOnProxyApp(eventCache, appConnConsensus, block)
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user