addressing PR 154 comments

This commit is contained in:
rigel rozanski 2017-07-06 05:39:58 -04:00
parent 0303f2aaaa
commit 9b561344fe
4 changed files with 7 additions and 7 deletions

View File

@ -46,7 +46,7 @@ type BaseTxPresenter struct {
}
// ParseData - unmarshal raw bytes to a basecoin tx
func (b BaseTxPresenter) ParseData(raw []byte) (interface{}, error) {
func (BaseTxPresenter) ParseData(raw []byte) (interface{}, error) {
var tx basecoin.Tx
err := wire.ReadBinaryBytes(raw, &tx)
return tx, err

View File

@ -21,7 +21,7 @@ var CounterTxCmd = &cobra.Command{
Long: `Add a vote to the counter.
You must pass --valid for it to count and the countfee will be added to the counter.`,
RunE: doCounterTx,
RunE: counterTx,
}
// nolint - flags names
@ -38,9 +38,9 @@ func init() {
fs.Int(FlagSequence, -1, "Sequence number for this transaction")
}
// TODO: doCounterTx is very similar to the sendtx one,
// TODO: counterTx is very similar to the sendtx one,
// maybe we can pull out some common patterns?
func doCounterTx(cmd *cobra.Command, args []string) error {
func counterTx(cmd *cobra.Command, args []string) error {
// load data from json or flags
var tx basecoin.Tx
found, err := txcmd.LoadJSON(&tx)

View File

@ -106,12 +106,12 @@ type Handler struct {
var _ stack.Dispatchable = Handler{}
// Name - return counter namespace
func (h Handler) Name() string {
func (Handler) Name() string {
return NameCounter
}
// AssertDispatcher - placeholder to satisfy XXX
func (h Handler) AssertDispatcher() {}
func (Handler) AssertDispatcher() {}
// CheckTx checks if the tx is properly structured
func (h Handler) CheckTx(ctx basecoin.Context, store types.KVStore, tx basecoin.Tx, _ basecoin.Checker) (res basecoin.Result, err error) {

View File

@ -30,7 +30,7 @@ func NewHandler() Handler {
}
// Name - return name space
func (h Handler) Name() string {
func (Handler) Name() string {
return NameCoin
}