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

Add block_by_hash RPC endpoint and tests #1089

Merged
merged 5 commits into from
Feb 15, 2022

Conversation

hansl
Copy link
Contributor

@hansl hansl commented Feb 10, 2022

Links #832.

Implements the block_by_hash RPC which returns an optional block.

  • Referenced an issue explaining the need for the change
  • Updated all relevant documentation in docs
  • Updated all code comments where relevant
  • Wrote tests
  • Added entry in .changelog/

@codecov-commenter
Copy link

codecov-commenter commented Feb 15, 2022

Codecov Report

Merging #1089 (1ff611c) into master (904862c) will decrease coverage by 0.0%.
The diff coverage is 33.3%.

Impacted file tree graph

@@           Coverage Diff            @@
##           master   #1089     +/-   ##
========================================
- Coverage    64.6%   64.6%   -0.1%     
========================================
  Files         239     240      +1     
  Lines       20695   20727     +32     
========================================
+ Hits        13387   13405     +18     
- Misses       7308    7322     +14     
Impacted Files Coverage Δ
rpc/src/client.rs 4.9% <0.0%> (-0.2%) ⬇️
rpc/src/client/bin/main.rs 0.3% <0.0%> (-0.1%) ⬇️
tools/rpc-probe/src/common.rs 0.0% <0.0%> (ø)
rpc/src/endpoint/block_by_hash.rs 10.0% <10.0%> (ø)
rpc/src/method.rs 24.7% <50.0%> (+0.9%) ⬆️
rpc/tests/kvstore_fixtures.rs 98.1% <100.0%> (+<0.1%) ⬆️
tendermint/src/block/commit_sig.rs 78.4% <0.0%> (-2.0%) ⬇️
light-client-verifier/src/types.rs 38.2% <0.0%> (-0.3%) ⬇️
tendermint/src/block/header.rs 99.2% <0.0%> (-0.1%) ⬇️
proto/src/lib.rs 100.0% <0.0%> (ø)
... and 6 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 904862c...1ff611c. Read the comment docs.

Copy link
Member

@thanethomson thanethomson left a comment

Choose a reason for hiding this comment

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

This looks great, thanks @hansl! 🎉 Just one minor nit regarding the changelog entry, and I think you need to do a cargo fmt, then we should be good to merge this.

.changelog/unreleased/features/832-block-by-hash.md Outdated Show resolved Hide resolved
hansl and others added 2 commits February 15, 2022 09:05
Co-authored-by: Thane Thomson <connect@thanethomson.com>
@hansl
Copy link
Contributor Author

hansl commented Feb 15, 2022

Merged your suggestion, and ran cargo fmt. Thanks!

@thanethomson thanethomson merged commit 33a4841 into informalsystems:master Feb 15, 2022
@hansl hansl deleted the block-by-hash branch February 16, 2022 01:21
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

3 participants