Skip to content
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

Added /consensus_params endpoint #2415

Merged
merged 3 commits into from
Sep 20, 2018
Merged

Conversation

scriptonist
Copy link
Contributor

@scriptonist scriptonist commented Sep 17, 2018

  • Updated all relevant documentation in docs
  • Updated all code comments where relevant
  • Wrote tests
  • Updated CHANGELOG_PENDING.md

Fixes #2311

@scriptonist
Copy link
Contributor Author

I would really appreciate some early feedback

Copy link
Contributor

@melekes melekes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@scriptonist scriptonist changed the title WIP - Added /consensus_params endpoint Added /consensus_params endpoint Sep 20, 2018
Copy link
Contributor

@xla xla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 :octocat: :shipit: 🍡

Thanks for your contribution and the clean addition provided!

// ConsensusParams for given height
type ResultConsensusParams struct {
BlockHeight int64 `json:"block_height"`
ConsensusParams *types.ConsensusParams `json:"consensus_params"`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor nit, should not be a pointer as it is non-optional.

@codecov-io
Copy link

codecov-io commented Sep 20, 2018

Codecov Report

Merging #2415 into develop will decrease coverage by 0.08%.
The diff coverage is 0%.

@@             Coverage Diff             @@
##           develop    #2415      +/-   ##
===========================================
- Coverage    60.99%   60.91%   -0.09%     
===========================================
  Files          197      197              
  Lines        16313    16322       +9     
===========================================
- Hits          9950     9942       -8     
- Misses        5496     5513      +17     
  Partials       867      867
Impacted Files Coverage Δ
rpc/core/routes.go 0% <ø> (ø) ⬆️
rpc/core/types/responses.go 53.33% <ø> (ø) ⬆️
rpc/core/consensus.go 0% <0%> (ø) ⬆️
consensus/reactor.go 71.94% <0%> (-1.08%) ⬇️
consensus/state.go 76.55% <0%> (-0.48%) ⬇️
blockchain/pool.go 66.43% <0%> (+0.69%) ⬆️
p2p/peer.go 59.09% <0%> (+1.13%) ⬆️

@melekes
Copy link
Contributor

melekes commented Sep 20, 2018

This also needs a changelog entry (CHANGELOG_PENDING.md).

@xla
Copy link
Contributor

xla commented Sep 20, 2018

@zramsay Any docs that need to be updated with this new endpoint being introduced?

@xla xla requested review from zramsay and removed request for ebuchman September 20, 2018 08:46
@xla xla merged commit 84b518b into tendermint:develop Sep 20, 2018
Copy link
Contributor

@ebuchman ebuchman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for writing this !! Only other thing missing is the changelog entry :)

return nil, err
}

consensusparams, err := sm.LoadConsensusParams(stateDB, height)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

consensusParams

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ebuchman What should I fill in the changelog entry ? can you help me with that?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should I open a new PR for incorporating these changes ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no worries we'll cover it! thanks again for the contribution!

for reference, for the next PR, add a note about your change in the CHANGELOG_PENDING.md file: https://github.com/tendermint/tendermint/blob/develop/CHANGELOG_PENDING.md

Be sure to follow the formats used there :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure thanks 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants