-
Notifications
You must be signed in to change notification settings - Fork 505
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
Use the Jsonrpc types as the abstraction layer in the store interfaces #877
base: develop
Are you sure you want to change the base?
Conversation
|
||
// GetHeaderByNumber returns the header by number | ||
GetHeaderByNumber(block uint64) (*types.Header, bool) | ||
Header() *Block |
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.
Why does header function return block? =)
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.
Yes, the name should be changed. The idea is that for the jsonrpc
module there is no difference between Block
and Header
. Thus, we should return only jsonrpc.Block
. The name has to change too.
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.
Now that I think about it, Header
is not a good name either for what it does. It should be LatestHeader
or something like that.
@@ -821,13 +675,13 @@ func (e *Eth) Unsubscribe(id string) (bool, error) { | |||
return e.filterManager.Uninstall(id), nil | |||
} | |||
|
|||
func (e *Eth) getBlockHeader(number BlockNumber) (*types.Header, error) { | |||
func (e *Eth) getBlockHeader(number BlockNumber) (*Block, 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.
the same
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 as before.
f73adfc
to
0bce5df
Compare
Description
Use the types from the
jsonrpc
package on the abstraction interface.Changes include
Breaking changes
Please complete this section if any breaking changes have been made, otherwise delete it
Checklist
Testing
Manual tests
Please complete this section if you ran manual tests for this functionality, otherwise delete it
Documentation update
Please link the documentation update PR in this section if it's present, otherwise delete it
Additional comments
Please post additional comments in this section if you have them, otherwise delete it