-
Notifications
You must be signed in to change notification settings - Fork 222
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
Fix getBlock and getBlocks RPC commands to return blocks and transactions properly #1716
Fix getBlock and getBlocks RPC commands to return blocks and transactions properly #1716
Conversation
Codecov Report
@@ Coverage Diff @@
## v0.10.2-dev #1716 +/- ##
===============================================
- Coverage 59.43% 59.37% -0.06%
===============================================
Files 551 551
Lines 21943 21962 +19
===============================================
Hits 13041 13041
- Misses 6825 6844 +19
Partials 2077 2077
Continue to review full report at Codecov.
|
5386022
to
4f74ba2
Compare
domain/consensus/consensus.go
Outdated
if errors.Is(err, database.ErrNotFound) { | ||
header, err := s.blockHeaderStore.BlockHeader(s.databaseContext, stagingArea, blockHash) | ||
if err != nil { | ||
if errors.Is(err, database.ErrNotFound) { |
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.
Instead of building a pyramid, please exit out of the function when err
is not ErrNotFound.
ec25a15
to
f7f80b2
Compare
f7f80b2
to
0d8589a
Compare
…ions properly (#1716) * Fix getBlock RPC command to return transactions * Fix getBlocks RPC command to return transactions and blocks * Add GetBlockEvenIfHeaderOnly and use it for getBlock and getBlocks * Implement GetBlockEvenIfHeaderOnly for fakeRelayInvsContext * Use less nested code (cherry picked from commit 50fd86e)
No description provided.