Implement RPCs for client_02#196
Conversation
|
@majecty Please take a look at the interface. In short, |
|
@junha1 The interface looks good to me. |
Now it uses same one with the Header.
a6c83a0 to
e464035
Compare
core/src/ibc/querier/mod.rs
Outdated
|
|
||
| use crate::ibc::IdentifierSlice; | ||
|
|
||
| pub trait Nameable { |
There was a problem hiding this comment.
The Nameable is used to print a debug message.
How about changing it like DebugName?
Then the name() should be changed to debug_name.
I found a discussion about trait name and it looks good to me.
If the trait has a single self-explanatory method (or a set of nearly identical methods), name it after the method: Clone, Hash, Default, Into, Write, ToOwned, AsRef, Extend.
rpc/src/v1/types/ibc.rs
Outdated
| #[serde(rename_all = "camelCase")] | ||
| pub struct IBCQuery { | ||
| pub number: u64, | ||
| pub data: String, |
There was a problem hiding this comment.
Shouldn't we use the data as a generic parameter T?
rpc/src/v1/types/ibc.rs
Outdated
| pub struct IBCQueryAbsence { | ||
| pub number: u64, | ||
| pub proof: Bytes, | ||
| } |
There was a problem hiding this comment.
When we will use IBCQueryAbsence type?
IMO, we should make IBCQuery.data as optionable.
It provides interfaces for querying data / proof for ICS subdb.
1eb99a8 to
4420b69
Compare
|
@majecty I updated all |
rpc/src/v1/types/ibc.rs
Outdated
| pub proof: Bytes, | ||
| } | ||
|
|
||
| /* -------- Client 02 -------- */ |
There was a problem hiding this comment.
We are not using /* comment.
Please use /// and use a full sentence.
rpc/src/v1/types/ibc.rs
Outdated
| #[serde(rename_all = "camelCase")] | ||
| pub struct ConsensusState { | ||
| pub validator_set_hash: H256, | ||
| // Unpacked CommitmentRoot |
| } | ||
|
|
||
| /// Client 02 related types | ||
|
|
There was a problem hiding this comment.
I added an extra line to say that this comment is not only for the one right after (ClientState).
#Closes #192