1- // Copyright 2019 Kodebox, Inc.
1+ // Copyright 2019-2020 Kodebox, Inc.
22// This file is part of CodeChain.
33//
44// This program is free software: you can redistribute it and/or modify
@@ -25,7 +25,7 @@ use ctypes::errors::RuntimeError;
2525use ctypes:: errors:: SyntaxError ;
2626use ctypes:: { CommonParams , Header } ;
2727use ibc:: client_02 as ibc_client;
28- use ibc:: client_02:: codechain as ibc_codechain ;
28+ use ibc:: client_02:: foundry as ibc_foundry ;
2929use ibc:: context as ibc_context;
3030use parking_lot:: RwLock ;
3131use rlp:: { Decodable , Rlp } ;
@@ -105,19 +105,19 @@ fn create_client(
105105) -> StateResult < ( ) > {
106106 let mut context = ibc_context:: TopLevelContext :: new ( state) ;
107107 let client_manager = ibc_client:: Manager :: new ( ) ;
108- if kind != ibc_client:: KIND_CODECHAIN {
108+ if kind != ibc_client:: KIND_FOUNDRY {
109109 return Err ( RuntimeError :: IBC ( format ! ( "CreateClient has invalid type {}" , kind) ) . into ( ) )
110110 }
111111 let rlp = rlp:: Rlp :: new ( consensus_state) ;
112- let codechain_consensus_state : ibc_codechain :: ConsensusState = match rlp. as_val ( ) {
112+ let foundry_consensus_state : ibc_foundry :: ConsensusState = match rlp. as_val ( ) {
113113 Ok ( cs) => cs,
114114 Err ( err) => {
115115 return Err ( RuntimeError :: IBC ( format ! ( "CreateClient failed to decode consensus state {}" , err) ) . into ( ) )
116116 }
117117 } ;
118118
119119 client_manager
120- . create ( & mut context, id, & codechain_consensus_state )
120+ . create ( & mut context, id, & foundry_consensus_state )
121121 . map_err ( |err| RuntimeError :: IBC ( format ! ( "CreateClient: {:?}" , err) ) ) ?;
122122 Ok ( ( ) )
123123}
0 commit comments