-
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
Add GetTrustedHeader #390
Add GetTrustedHeader #390
Conversation
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.
Thanks for doing this, I think we can simply the logic here by making the function a little more generic. The TODO can be removed as well along with adding an error check
relayer/headers.go
Outdated
@@ -100,6 +100,16 @@ func (uh *SyncHeaders) GetTrustedHeaders(src, dst *Chain) (srcTh, dstTh *tmclien | |||
return | |||
} | |||
|
|||
func (uh *SyncHeaders) GetTrusteddsthHeader(src, dst *Chain) (dstTh *tmclient.Header, err error) { |
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.
Maybe rename to GetTrustedHeader
, but construct the call like:
sh.GetTrsutedHeader(dst, c)
note the swapping. This way we can reuse this function for source if needed
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.
Nice work, thanks!
No description provided.