-
Notifications
You must be signed in to change notification settings - Fork 115
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
Expose staking event hashes + add GetGenesisDocument to consensus client API #2889
Expose staking event hashes + add GetGenesisDocument to consensus client API #2889
Conversation
3ba7b09
to
e2b4e88
Compare
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.
Consider describing the changes in the changelog fragment, also I think they should be features as they change the external API.
@@ -446,6 +446,24 @@ func (t *tendermintService) StateToGenesis(ctx context.Context, blockHeight int6 | |||
}, nil | |||
} | |||
|
|||
func (t *tendermintService) GetGenesisDocument(ctx context.Context) (*genesisAPI.Document, 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.
Don't forget to remove the existing GetGenesis
method that exists in the tendermint-specific service (any callers should use this new one).
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.
Is this the right thing to name the method? It's a state dump, not a genesis document (#2886 is illustrative of the fact that there is a difference).
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.
After the suggested changes, GetGenesisDocument
returns t.genesis
, so it should be equivalent to the old GetGenesis
method.
Codecov Report
@@ Coverage Diff @@
## master #2889 +/- ##
==========================================
+ Coverage 67.69% 67.97% +0.27%
==========================================
Files 352 352
Lines 34188 34238 +50
==========================================
+ Hits 23145 23274 +129
+ Misses 8069 8003 -66
+ Partials 2974 2961 -13
Continue to review full report at Codecov.
|
e2b4e88
to
55e72c7
Compare
Thanks for the review comments, I've addressed them now, so this is ready for re-review :) |
55e72c7
to
5fd0773
Compare
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.
Add tests for the new consensus method (GetGenesisDocument
) to go/consensus/tests/tester.go
. Also consider testing somewhere that events contain proper transaction hashes (e.g. in the same place where you test GetEvents
).
3162169
to
45d3577
Compare
Done! :) |
45d3577
to
886fc48
Compare
Thanks! Ready for re-review. |
No description provided.