Refactor to use FeeHandler function

This commit is contained in:
Christopher Goes
2018-04-16 14:15:03 +02:00
parent 7fafa9e021
commit 39ee95abe4
8 changed files with 27 additions and 56 deletions
-2
View File
@@ -48,8 +48,6 @@ type AccountMapper interface {
NewAccountWithAddress(ctx Context, addr Address) Account
GetAccount(ctx Context, addr Address) Account
SetAccount(ctx Context, acc Account)
GetFeePool(ctx Context) Coins
SetFeePool(ctx Context, coins Coins)
}
// AccountDecoder unmarshals account bytes
+3
View File
@@ -3,5 +3,8 @@ package types
// core function variable which application runs for transactions
type Handler func(ctx Context, msg Msg) Result
// core function variable which application runs to handle fees
type FeeHandler func(ctx Context, fee Coins)
// If newCtx.IsZero(), ctx is used instead.
type AnteHandler func(ctx Context, tx Tx) (newCtx Context, result Result, abort bool)