From 129c4a193936888f2bc41265d4967865c28747ef Mon Sep 17 00:00:00 2001 From: Codegnosis Date: Wed, 30 Oct 2019 15:16:42 +0000 Subject: [PATCH] gofmt & lint --- cmd/und/main.go | 4 ++-- x/wrkchain/ante.go | 10 +++++----- x/wrkchain/client/rest/tx.go | 2 -- x/wrkchain/internal/keeper/keeper.go | 8 ++++---- 4 files changed, 11 insertions(+), 13 deletions(-) diff --git a/cmd/und/main.go b/cmd/und/main.go index 0a2bf0a3..35e33113 100644 --- a/cmd/und/main.go +++ b/cmd/und/main.go @@ -72,13 +72,13 @@ func newApp(logger log.Logger, db dbm.DB, traceStore io.Writer) abci.Application cache = store.NewCommitKVStoreCacheManager() } - return app.NewMainchainApp(logger, db, traceStore,true, + return app.NewMainchainApp(logger, db, traceStore, true, baseapp.SetPruning(store.NewPruningOptionsFromString(viper.GetString("pruning"))), baseapp.SetMinGasPrices(viper.GetString(server.FlagMinGasPrices)), baseapp.SetHaltHeight(viper.GetUint64(server.FlagHaltHeight)), baseapp.SetHaltTime(viper.GetUint64(server.FlagHaltTime)), baseapp.SetInterBlockCache(cache), - ) + ) } func exportAppStateAndTMValidators( diff --git a/x/wrkchain/ante.go b/x/wrkchain/ante.go index 13921545..e6b21cc6 100644 --- a/x/wrkchain/ante.go +++ b/x/wrkchain/ante.go @@ -29,14 +29,14 @@ type FeeTx interface { // 3. Checks if the fee payer has sufficient funds in their account to pay for it // // If any of the checks fail, a suitable error is returned. -type CorrectWrkChainFeeDecorator struct{ - ak auth.AccountKeeper - wck Keeper +type CorrectWrkChainFeeDecorator struct { + ak auth.AccountKeeper + wck Keeper } func NewWrkChainFeeDecorator(ak auth.AccountKeeper, wrkchainKeeper Keeper) CorrectWrkChainFeeDecorator { return CorrectWrkChainFeeDecorator{ - ak: ak, + ak: ak, wck: wrkchainKeeper, } } @@ -67,7 +67,7 @@ func (wfd CorrectWrkChainFeeDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, si } // check fee payer is WRKChain Owner - err = checkWrkChainOwnerFeePayer(feeTx) + err = checkWrkChainOwnerFeePayer(feeTx) if err != nil { return ctx, err } diff --git a/x/wrkchain/client/rest/tx.go b/x/wrkchain/client/rest/tx.go index 98658425..d6163186 100644 --- a/x/wrkchain/client/rest/tx.go +++ b/x/wrkchain/client/rest/tx.go @@ -17,7 +17,6 @@ type registerWrkChainReq struct { WrkChainName string `json:"name"` GenesisHash string `json:"genesis"` Owner string `json:"owner"` - Fee string `json:"fee"` } type recordWrkChainBlockReq struct { @@ -30,7 +29,6 @@ type recordWrkChainBlockReq struct { Hash2 string `json:"hash2"` Hash3 string `json:"hash3"` Owner string `json:"owner"` - Fee string `json:"fee"` } func registerWrkChainHandler(cliCtx context.CLIContext) http.HandlerFunc { diff --git a/x/wrkchain/internal/keeper/keeper.go b/x/wrkchain/internal/keeper/keeper.go index 0faa7e0b..a10a781a 100644 --- a/x/wrkchain/internal/keeper/keeper.go +++ b/x/wrkchain/internal/keeper/keeper.go @@ -10,15 +10,15 @@ import ( // Keeper maintains the link to data storage and exposes getter/setter methods for the various parts of the state machine type Keeper struct { - storeKey sdk.StoreKey // Unexposed key to access store from sdk.Context - cdc *codec.Codec // The wire codec for binary encoding/decoding. + storeKey sdk.StoreKey // Unexposed key to access store from sdk.Context + cdc *codec.Codec // The wire codec for binary encoding/decoding. } // NewKeeper creates new instances of the nameservice Keeper func NewKeeper(storeKey sdk.StoreKey, cdc *codec.Codec) Keeper { return Keeper{ - storeKey: storeKey, - cdc: cdc, + storeKey: storeKey, + cdc: cdc, } }