@@ -33,7 +33,7 @@ import (
33
33
"github.com/stretchr/testify/require"
34
34
35
35
bandapp "github.com/bandprotocol/chain/v2/app"
36
- "github.com/bandprotocol/chain/v2/testing/testapp "
36
+ bandtesting "github.com/bandprotocol/chain/v2/testing"
37
37
"github.com/bandprotocol/chain/v2/x/oracle/types"
38
38
)
39
39
@@ -48,7 +48,7 @@ type TestChain struct {
48
48
t * testing.T
49
49
50
50
Coordinator * Coordinator
51
- App * testapp .TestingApp
51
+ App * bandtesting .TestingApp
52
52
ChainID string
53
53
LastHeader * ibctmtypes.Header // header for last block height committed
54
54
CurrentHeader tmproto.Header // header for current block height
@@ -83,22 +83,22 @@ func NewTestChain(t *testing.T, coord *Coordinator, chainID string) *TestChain {
83
83
84
84
for i := uint64 (0 ); i < valSize ; i ++ {
85
85
// generate validator private/public key
86
- privVal := mock.PV {PrivKey : testapp .Validators [i ].PrivKey }
87
- tmPub , err := cryptocodec .ToTmPubKeyInterface (testapp .Validators [i ].PubKey )
86
+ privVal := mock.PV {PrivKey : bandtesting .Validators [i ].PrivKey }
87
+ tmPub , err := cryptocodec .ToTmPubKeyInterface (bandtesting .Validators [i ].PubKey )
88
88
require .NoError (t , err )
89
89
90
90
// create validator set with two validators
91
91
validators [i ] = tmtypes .NewValidator (tmPub , 1 )
92
92
93
93
signers [i ] = privVal
94
94
95
- senders [testapp .Validators [i ].Address .String ()] = authtypes .NewBaseAccount (
96
- testapp .Validators [i ].PubKey .Address ().Bytes (),
97
- testapp .Validators [i ].PubKey ,
95
+ senders [bandtesting .Validators [i ].Address .String ()] = authtypes .NewBaseAccount (
96
+ bandtesting .Validators [i ].PubKey .Address ().Bytes (),
97
+ bandtesting .Validators [i ].PubKey ,
98
98
i ,
99
99
0 ,
100
100
)
101
- genesisAccount [i ] = senders [testapp .Validators [i ].Address .String ()]
101
+ genesisAccount [i ] = senders [bandtesting .Validators [i ].Address .String ()]
102
102
balances [i ] = banktypes.Balance {
103
103
Address : genesisAccount [i ].GetAddress ().String (),
104
104
Coins : sdk .NewCoins (sdk .NewCoin ("uband" , sdk .NewInt (10000000 ))),
@@ -107,7 +107,7 @@ func NewTestChain(t *testing.T, coord *Coordinator, chainID string) *TestChain {
107
107
108
108
valSet := tmtypes .NewValidatorSet (validators )
109
109
110
- app := testapp .SetupWithGenesisValSet (t , valSet , genesisAccount , chainID , balances ... )
110
+ app := bandtesting .SetupWithGenesisValSet (t , valSet , genesisAccount , chainID , balances ... )
111
111
ctx := app .NewContext (false , tmproto.Header {Height : app .LastBlockHeight ()})
112
112
vals := app .StakingKeeper .GetAllValidators (ctx )
113
113
for _ , v := range vals {
@@ -136,9 +136,9 @@ func NewTestChain(t *testing.T, coord *Coordinator, chainID string) *TestChain {
136
136
Codec : app .AppCodec (),
137
137
Vals : valSet ,
138
138
Signers : signers ,
139
- SenderPrivKey : testapp .Validators [0 ].PrivKey ,
139
+ SenderPrivKey : bandtesting .Validators [0 ].PrivKey ,
140
140
SenderAccount : genesisAccount [0 ],
141
- Treasury : testapp .Treasury .Address ,
141
+ Treasury : bandtesting .Treasury .Address ,
142
142
senders : senders ,
143
143
}
144
144
@@ -254,7 +254,7 @@ func (chain *TestChain) SendMsgs(msgs ...sdk.Msg) (*sdk.Result, error) {
254
254
// ensure the chain has the latest time
255
255
chain .Coordinator .UpdateTimeForChain (chain )
256
256
257
- _ , r , err := testapp .SignAndDeliver (
257
+ _ , r , err := bandtesting .SignAndDeliver (
258
258
chain .t ,
259
259
chain .TxConfig ,
260
260
chain .App .GetBaseApp (),
@@ -287,14 +287,14 @@ func (chain *TestChain) SendMsgs(msgs ...sdk.Msg) (*sdk.Result, error) {
287
287
func (chain * TestChain ) SendReport (
288
288
rid types.RequestID ,
289
289
rawReps []types.RawReport ,
290
- sender testapp .Account ,
290
+ sender bandtesting .Account ,
291
291
) (* sdk.Result , error ) {
292
292
senderAccount := chain .senders [sender .Address .String ()]
293
293
294
294
// ensure the chain has the latest time
295
295
chain .Coordinator .UpdateTimeForChain (chain )
296
296
297
- _ , r , err := testapp .SignAndDeliver (
297
+ _ , r , err := bandtesting .SignAndDeliver (
298
298
chain .t ,
299
299
chain .TxConfig ,
300
300
chain .App .GetBaseApp (),
0 commit comments