File tree Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -301,6 +301,9 @@ impl<const SYNC_COMMITTEE_SIZE: usize> Ics2ClientState for ClientState<SYNC_COMM
301
301
consensus_state : Any ,
302
302
) -> Result < Box < dyn Ics02ConsensusState > , ClientError > {
303
303
self . validate ( ) ?;
304
+ if self . is_frozen ( ) {
305
+ return Err ( Error :: CannotInitializeFrozenClient . into ( ) ) ;
306
+ }
304
307
let consensus_state = ConsensusState :: try_from ( consensus_state) ?;
305
308
consensus_state. validate ( ) ?;
306
309
Ok ( ConsensusState :: into_box ( consensus_state) )
Original file line number Diff line number Diff line change @@ -111,6 +111,8 @@ pub enum Error {
111
111
ProtoMissingFieldError ( String ) ,
112
112
/// unknown message type: `{0}`
113
113
UnknownMessageType ( String ) ,
114
+ /// cannot initialize frozen client
115
+ CannotInitializeFrozenClient ,
114
116
}
115
117
116
118
impl Error {
You can’t perform that action at this time.
0 commit comments