Skip to content

Commit

Permalink
Added comments to BeginBlocker and EndBlocker about no_empty_blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanfrey committed Jun 25, 2019
1 parent dba4f40 commit 310422c
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions types/abci.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,20 @@ package types

import abci "github.com/tendermint/tendermint/abci/types"

// initialize application state at genesis
// InitChainer initializes application state at genesis
type InitChainer func(ctx Context, req abci.RequestInitChain) abci.ResponseInitChain

// run code before the transactions in a block
// BeginBlocker runs code before the transactions in a block
//
// Note: applications which set create_empty_blocks=false will not have regular block timing and should use
// e.g. BFT timestamps rather than block height for any periodic BeginBlock logic
type BeginBlocker func(ctx Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock

// run code after the transactions in a block and return updates to the validator set
// EndBlocker runs code after the transactions in a block and return updates to the validator set
//
// Note: applications which set create_empty_blocks=false will not have regular block timing and should use
// e.g. BFT timestamps rather than block height for any periodic EndBlock logic
type EndBlocker func(ctx Context, req abci.RequestEndBlock) abci.ResponseEndBlock

// respond to p2p filtering queries from Tendermint
// PeerFilter responds to p2p filtering queries from Tendermint
type PeerFilter func(info string) abci.ResponseQuery

0 comments on commit 310422c

Please sign in to comment.