-
Notifications
You must be signed in to change notification settings - Fork 82
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
Split MsgUpdateClient
back into MsgUpdateClient
and MsgSubmitMisbehaviour
#643
Conversation
This reverts commit ff6a968.
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #643 +/- ##
==========================================
- Coverage 73.00% 72.96% -0.04%
==========================================
Files 125 126 +1
Lines 15663 15686 +23
==========================================
+ Hits 11434 11446 +12
- Misses 4229 4240 +11
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
let domain_msg = | ||
<update_client::MsgUpdateClient as Protobuf<RawMsgUpdateClient>>::decode_vec( | ||
&any_msg.value, |
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.
Can we write update_client::MsgUpdateClient::decode_vec(&any_msg.value)
instead?
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.
update_client::MISBEHAVIOUR_TYPE_URL => { | ||
let domain_msg = <update_client::MsgUpdateClient as Protobuf< | ||
misbehaviour::TYPE_URL => { | ||
let domain_msg = <misbehaviour::MsgSubmitMisbehaviour as Protobuf< | ||
RawMsgSubmitMisbehaviour, | ||
>>::decode_vec(&any_msg.value) |
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.
Same here misbehaviour::MsgSubmitMisbehaviour::decode_vec(&any_msg.value)
?
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.
@@ -34,8 +19,7 @@ pub enum UpdateKind { | |||
#[derive(Clone, Debug, PartialEq, Eq)] | |||
pub struct MsgUpdateClient { | |||
pub client_id: ClientId, | |||
pub client_message: Any, | |||
pub update_kind: UpdateKind, | |||
pub header: Any, | |||
pub signer: Signer, | |||
} | |||
|
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.
Should we re-add Msg
implementation to be consistent with others?
impl Msg for MsgUpdateClient {
type Raw = RawMsgUpdateClient;
fn type_url(&self) -> String {
TYPE_URL.to_string()
}
}
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.
…behaviour` (#643) * Add misbehaviour message back * remove Protobuf<Misbehaviour> for UpdateClient message * new `MsgUpdateOrMisbehaviour` * Revert "new `MsgUpdateOrMisbehaviour`" This reverts commit ff6a968. * Fix ClientState::update_state's signature * Update update_client::validate * fix interface * fix TYPE_URL * Move UpdateKind * changelog * fmt * simplify syntax * impl Msg for MsgUpdateClient
Closes: #628
cc @hdevalence
PR author checklist:
unclog
.docs/
).Reviewer checklist:
Files changed
in the GitHub PR explorer.