2017-12-01 14:08:37 -08:00
|
|
|
package types
|
2017-11-26 14:14:03 -08:00
|
|
|
|
2018-06-26 14:20:59 -07:00
|
|
|
// Handler defines the core of the state transition function of an application.
|
2018-01-26 06:22:56 -08:00
|
|
|
type Handler func(ctx Context, msg Msg) Result
|
2018-01-12 11:49:53 -08:00
|
|
|
|
2018-06-26 14:20:59 -07:00
|
|
|
// AnteHandler authenticates transactions, before their internal messages are handled.
|
2018-01-26 05:11:01 -08:00
|
|
|
// If newCtx.IsZero(), ctx is used instead.
|
2018-08-25 12:12:14 -07:00
|
|
|
type AnteHandler func(ctx Context, tx Tx, simulate bool) (newCtx Context, result Result, abort bool)
|