2018-02-16 17:15:38 -08:00
|
|
|
package types
|
|
|
|
|
2018-06-28 17:54:47 -07:00
|
|
|
import abci "github.com/tendermint/tendermint/abci/types"
|
2018-02-16 17:15:38 -08:00
|
|
|
|
2019-06-25 10:11:22 -07:00
|
|
|
// InitChainer initializes application state at genesis
|
2018-02-17 15:10:55 -08:00
|
|
|
type InitChainer func(ctx Context, req abci.RequestInitChain) abci.ResponseInitChain
|
|
|
|
|
2019-06-25 10:11:22 -07:00
|
|
|
// 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
|
2019-04-05 13:20:58 -07:00
|
|
|
type BeginBlocker func(ctx Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock
|
2018-02-17 15:10:55 -08:00
|
|
|
|
2019-06-25 10:11:22 -07:00
|
|
|
// 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
|
2019-04-05 13:20:58 -07:00
|
|
|
type EndBlocker func(ctx Context, req abci.RequestEndBlock) abci.ResponseEndBlock
|
2018-05-15 07:00:17 -07:00
|
|
|
|
2019-06-25 10:11:22 -07:00
|
|
|
// PeerFilter responds to p2p filtering queries from Tendermint
|
2018-05-15 07:00:17 -07:00
|
|
|
type PeerFilter func(info string) abci.ResponseQuery
|