@@ -11,28 +11,31 @@ use basecoin_app::{BaseCoinApp, Builder};
11
11
use basecoin_store:: context:: { ProvableStore , Store } ;
12
12
use basecoin_store:: impls:: RevertibleStore ;
13
13
use basecoin_store:: utils:: SharedRwExt ;
14
- use ibc:: clients:: ics07_tendermint:: client_type as tm_client_type;
15
- use ibc:: clients:: ics07_tendermint:: consensus_state:: ConsensusState as TmConsensusState ;
16
- use ibc:: core:: ics02_client:: client_state:: ClientStateCommon ;
17
- use ibc:: core:: ics02_client:: ClientExecutionContext ;
18
- use ibc:: core:: ics03_connection:: connection:: {
19
- ConnectionEnd , Counterparty as ConnCounterparty , State as ConnectionState ,
14
+ use ibc_client_tendermint:: client_state:: ClientState as TmClientState ;
15
+ use ibc_client_tendermint:: types:: {
16
+ client_type as tm_client_type, ConsensusState as TmConsensusState ,
20
17
} ;
21
- use ibc:: core:: ics03_connection:: version:: Version as ConnectionVersion ;
22
- use ibc:: core:: ics04_channel:: channel:: {
18
+ use ibc_core:: channel:: types:: channel:: {
23
19
ChannelEnd , Counterparty as ChanCounterparty , Order , State as ChannelState ,
24
20
} ;
25
- use ibc:: core:: ics04_channel:: packet:: Sequence ;
26
- use ibc:: core:: ics04_channel:: Version as ChannelVersion ;
27
- use ibc:: core:: ics23_commitment:: commitment:: CommitmentProofBytes ;
28
- use ibc:: core:: ics24_host:: identifier:: { ChainId , ChannelId , ClientId , ConnectionId , PortId } ;
29
- use ibc:: core:: ics24_host:: path:: {
21
+ use ibc_core:: channel:: types:: Version as ChannelVersion ;
22
+ use ibc_core:: client:: context:: client_state:: ClientStateCommon ;
23
+ use ibc_core:: client:: context:: ClientExecutionContext ;
24
+ use ibc_core:: client:: types:: Height ;
25
+ use ibc_core:: commitment_types:: commitment:: CommitmentProofBytes ;
26
+ use ibc_core:: connection:: types:: version:: Version as ConnectionVersion ;
27
+ use ibc_core:: connection:: types:: {
28
+ ConnectionEnd , Counterparty as ConnCounterparty , State as ConnectionState ,
29
+ } ;
30
+ use ibc_core:: host:: types:: identifiers:: {
31
+ ChainId , ChannelId , ClientId , ConnectionId , PortId , Sequence ,
32
+ } ;
33
+ use ibc_core:: host:: types:: path:: {
30
34
ChannelEndPath , ClientConsensusStatePath , ClientStatePath , ConnectionPath , Path , SeqAckPath ,
31
35
SeqRecvPath , SeqSendPath ,
32
36
} ;
33
- use ibc:: core:: { ExecutionContext , ValidationContext } ;
34
- use ibc:: hosts:: tendermint:: IBC_QUERY_PATH ;
35
- use ibc:: Height ;
37
+ use ibc_core:: host:: { ExecutionContext , ValidationContext } ;
38
+ use ibc_core_host_cosmos:: IBC_QUERY_PATH ;
36
39
use tendermint:: abci:: request:: { InitChain , Query } ;
37
40
use tendermint:: block:: Height as TmHeight ;
38
41
use tendermint:: v0_37:: abci:: { Request as AbciRequest , Response as AbciResponse } ;
@@ -288,7 +291,7 @@ impl<S: ProvableStore + Default + Debug> MockCosmosChain<S> {
288
291
let client_state =
289
292
dummy_tm_client_state ( self . chain_id . clone ( ) , Height :: new ( 0 , 10 ) . unwrap ( ) ) ;
290
293
291
- let latest_height = client_state. latest_height ( ) ;
294
+ let latest_height = TmClientState :: from ( client_state. clone ( ) ) . latest_height ( ) ;
292
295
293
296
self . ibc_ctx ( )
294
297
. store_update_time (
@@ -309,17 +312,14 @@ impl<S: ProvableStore + Default + Debug> MockCosmosChain<S> {
309
312
self . ibc_ctx ( ) . increase_client_counter ( ) . unwrap ( ) ;
310
313
311
314
self . ibc_ctx ( )
312
- . store_client_state ( client_state_path, client_state)
315
+ . store_client_state ( client_state_path, client_state. into ( ) )
313
316
. unwrap ( ) ;
314
317
315
- let consensus_state_path =
316
- ClientConsensusStatePath :: new ( & client_id, & Height :: new ( 0 , 10 ) . unwrap ( ) ) ;
318
+ let consensus_state_path = ClientConsensusStatePath :: new ( client_id. clone ( ) , 0 , 10 ) ;
317
319
318
- let consensus_state = AnyConsensusState :: Tendermint ( TmConsensusState :: new (
319
- vec ! [ ] . into ( ) ,
320
- Time :: now ( ) ,
321
- Hash :: None ,
322
- ) ) ;
320
+ let consensus_state = AnyConsensusState :: Tendermint (
321
+ TmConsensusState :: new ( vec ! [ ] . into ( ) , Time :: now ( ) , Hash :: None ) . into ( ) ,
322
+ ) ;
323
323
324
324
self . ibc_ctx ( )
325
325
. store_consensus_state ( consensus_state_path, consensus_state)
0 commit comments