Add SetOption to all middleware and handlers

This commit is contained in:
Ethan Frey
2017-07-03 18:10:46 +02:00
parent 159574db89
commit fa1a300943
18 changed files with 169 additions and 35 deletions
+7
View File
@@ -1,6 +1,8 @@
package coin
import (
"github.com/tendermint/tmlibs/log"
"github.com/tendermint/basecoin"
"github.com/tendermint/basecoin/errors"
"github.com/tendermint/basecoin/types"
@@ -74,6 +76,11 @@ func (h Handler) DeliverTx(ctx basecoin.Context, store types.KVStore, tx basecoi
return basecoin.Result{}, nil
}
func (h Handler) SetOption(l log.Logger, store types.KVStore, key, value string) (log string, err error) {
// TODO
return "ok", nil
}
func checkTx(ctx basecoin.Context, tx basecoin.Tx) (send SendTx, err error) {
// check if the tx is proper type and valid
send, ok := tx.Unwrap().(SendTx)
+1
View File
@@ -23,6 +23,7 @@ type AccountChecker interface {
type SimpleFeeHandler struct {
AccountChecker
MinFee types.Coins
stack.PassOption
}
func (_ SimpleFeeHandler) Name() string {