Skip to content

Commit

Permalink
airport #2
Browse files Browse the repository at this point in the history
  • Loading branch information
tac0turtle committed Sep 20, 2019
1 parent db49047 commit 98be6b9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 11 deletions.
6 changes: 3 additions & 3 deletions x/poa/internal/keeper/keeper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
)

func TestParams(t *testing.T) {
ctx, _, keeper, _ := CreateTestInput(t, false, 0)
ctx, _, keeper, _ := CreateTestInput(t, false)
expParams := types.DefaultParams()

//check that the empty keeper loads the default
Expand All @@ -20,5 +20,5 @@ func TestParams(t *testing.T) {
expParams.MaxValidators = 777
keeper.SetParams(ctx, expParams)
resParams = keeper.GetParams(ctx)
require.True(t, expParams.Equal(resParams)
}
require.True(t, expParams.Equal(resParams))
}
10 changes: 3 additions & 7 deletions x/poa/internal/keeper/test_common.go
Original file line number Diff line number Diff line change
@@ -1,17 +1,11 @@
package keeper

import (
"bytes"
"encoding/hex"
"math/rand"
"strconv"
"testing"

"github.com/stretchr/testify/require"

abci "github.com/tendermint/tendermint/abci/types"
"github.com/tendermint/tendermint/crypto"
"github.com/tendermint/tendermint/crypto/ed25519"
"github.com/tendermint/tendermint/libs/log"
tmtypes "github.com/tendermint/tendermint/types"
dbm "github.com/tendermint/tm-db"
Expand All @@ -21,8 +15,9 @@ import (
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/x/auth"
"github.com/cosmos/cosmos-sdk/x/bank"
"github.com/cosmos/cosmos-sdk/x/params"
"github.com/cosmos/cosmos-sdk/x/supply"
"github.com/cosmos/cosmos-sdk/x/params"

"github.com/cosmos/cosmos-sdk/x/poa/internal/types"
)

Expand All @@ -39,6 +34,7 @@ func MakeTestCodec() *codec.Codec {
// Register AppAccount
cdc.RegisterInterface((*auth.Account)(nil), nil)
cdc.RegisterConcrete(&auth.BaseAccount{}, "test/staking/BaseAccount", nil)
supply.RegisterCodec(cdc)
codec.RegisterCrypto(cdc)

return cdc
Expand Down
2 changes: 1 addition & 1 deletion x/poa/proposal_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ func NewPOAProposalHandler(k Keeper) govtypes.Handler {
return func(ctx sdk.Context, content govtypes.Content) sdk.Error {
switch c := content.(type) {
case MsgProposeCreateValidator:
return handleMsgProposeCreateValidatorl(ctx, k, c)
return handleMsgProposeCreateValidator(ctx, k, c)

default:
errMsg := fmt.Sprintf("unrecognized poa proposal content type: %T", c)
Expand Down

0 comments on commit 98be6b9

Please sign in to comment.