-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
imp(ics23): fallible conversion for ProofSpec
, LeafOp
, InnerSpec
#1160
Changes from all commits
f9fc039
9dd0569
84f3122
c921a7c
b182566
db28ff2
53f8915
303377c
c8f6efa
75947b1
6608bb9
4047f6f
206c366
a055cfd
35bb2f0
696072e
0183fcb
b370f70
c9b2454
6c465d5
3a035c5
6928051
c39de0d
519f65b
53ac059
3fb22e3
061a032
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -296,7 +296,7 @@ impl TryFrom<RawTmClientState> for ClientState { | |
unbonding_period, | ||
max_clock_drift, | ||
latest_height, | ||
raw.proof_specs.into(), | ||
raw.proof_specs.try_into()?, | ||
raw.upgrade_path, | ||
frozen_height, | ||
allow_update, | ||
|
@@ -411,8 +411,6 @@ pub(crate) mod serde_tests { | |
|
||
#[cfg(test)] | ||
mod tests { | ||
use ibc_core_commitment_types::proto::ics23::ProofSpec as Ics23ProofSpec; | ||
|
||
use super::*; | ||
|
||
#[derive(Clone, Debug, PartialEq)] | ||
|
@@ -556,28 +554,6 @@ mod tests { | |
}, | ||
want_pass: false, | ||
}, | ||
Test { | ||
name: "Invalid (empty) proof specs".to_string(), | ||
params: ClientStateParams { | ||
proof_specs: Vec::<Ics23ProofSpec>::new().into(), | ||
..default_params.clone() | ||
}, | ||
want_pass: false, | ||
}, | ||
Test { | ||
name: "Invalid (empty) proof specs depth range".to_string(), | ||
params: ClientStateParams { | ||
proof_specs: vec![Ics23ProofSpec { | ||
leaf_spec: None, | ||
inner_spec: None, | ||
min_depth: 2, | ||
max_depth: 1, | ||
prehash_key_before_comparison: false, | ||
}].into(), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just to confirm - this test is removed because I think, it's still ok to leave them here. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. update: this will fail when unwrapping. so this must be removed. |
||
..default_params | ||
}, | ||
want_pass: false, | ||
}, | ||
] | ||
.into_iter() | ||
.collect(); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think, we can leave this test here, no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can remove it after disallowing empty proof specs in
Vec<RawProofSpec>::try_from
.