-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
fix update client bug and reduce complexity #421
Conversation
@@ -91,13 +94,9 @@ func (c *Chain) InjectTrustedFields(dst *Chain, header *tmclient.Header) (*tmcli | |||
// make copy of header stored in mop | |||
h := *(header) | |||
|
|||
dstH, err := dst.GetLatestLightHeight() |
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.
this logic didn't make any sense. We should just query using the latest state possible
func (c *Chain) UpdateClient(header ibcexported.Header) sdk.Msg { | ||
// UpdateClient creates an sdk.Msg to update the client on src with data pulled from dst. | ||
func (c *Chain) UpdateClient(dst *Chain) (sdk.Msg, error) { | ||
header, err := dst.GetIBCUpdateHeader(c) |
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.
++ so much code reduction with this one addition
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.
utACK
No description provided.