@@ -4,11 +4,9 @@ import (
4
4
"testing"
5
5
"time"
6
6
7
- "github.com/cosmos/cosmos-sdk/codec"
8
7
cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types"
9
8
"github.com/cosmos/cosmos-sdk/simapp/helpers"
10
9
sdk "github.com/cosmos/cosmos-sdk/types"
11
- authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
12
10
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
13
11
"github.com/stretchr/testify/require"
14
12
abci "github.com/tendermint/tendermint/abci/types"
@@ -47,7 +45,7 @@ func TestAppAnteHandler(t *testing.T) {
47
45
tApp = tApp .InitializeFromGenesisStatesWithTimeAndChainID (
48
46
time .Date (1998 , 1 , 1 , 0 , 0 , 0 , 0 , time .UTC ),
49
47
chainID ,
50
- NewFundedGenStateWithSameCoins (
48
+ app . NewFundedGenStateWithSameCoins (
51
49
tApp .AppCodec (),
52
50
sdk .NewCoins (sdk .NewInt64Coin ("ukava" , 1e9 )),
53
51
testAddresses ,
@@ -128,36 +126,6 @@ func TestAppAnteHandler(t *testing.T) {
128
126
}
129
127
}
130
128
131
- // NewFundedGenStateWithSameCoins creates a (auth and bank) genesis state populated with accounts from the given addresses and balance.
132
- func NewFundedGenStateWithSameCoins (cdc codec.JSONCodec , balance sdk.Coins , addresses []sdk.AccAddress ) app.GenesisState {
133
- balances := make ([]banktypes.Balance , len (addresses ))
134
- for i , addr := range addresses {
135
- balances [i ] = banktypes.Balance {
136
- Address : addr .String (),
137
- Coins : balance ,
138
- }
139
- }
140
-
141
- bankGenesis := banktypes .NewGenesisState (
142
- banktypes .DefaultParams (),
143
- balances ,
144
- nil ,
145
- []banktypes.Metadata {}, // Metadata is not used in the antehandler to it is left out here
146
- )
147
-
148
- accounts := make (authtypes.GenesisAccounts , len (addresses ))
149
- for i := range addresses {
150
- accounts [i ] = authtypes .NewBaseAccount (addresses [i ], nil , 0 , 0 )
151
- }
152
-
153
- authGenesis := authtypes .NewGenesisState (authtypes .DefaultParams (), accounts )
154
-
155
- return app.GenesisState {
156
- authtypes .ModuleName : cdc .MustMarshalJSON (authGenesis ),
157
- banktypes .ModuleName : cdc .MustMarshalJSON (bankGenesis ),
158
- }
159
- }
160
-
161
129
// TODO Test pricefeed oracles and bep3 deputy txs can always get into the mempool.
162
130
163
131
// func newPricefeedGenStateMulti(cdc codec.JSONCodec, oracles []sdk.AccAddress) app.GenesisState {
0 commit comments