-
Notifications
You must be signed in to change notification settings - Fork 37
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 format block to handle fullTx false case #53
Conversation
WalkthroughThe changes involve modifications to the Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant JSONRPCBackend
participant BlockHeaderMap
participant EVMIndexerImpl
Client->>JSONRPCBackend: GetBlockByNumber(ethBlockNum, fullTx)
JSONRPCBackend->>BlockHeaderMap: Retrieve Block Headers
BlockHeaderMap-->>JSONRPCBackend: Return Block Headers
JSONRPCBackend->>JSONRPCBackend: Iterate over Transactions
JSONRPCBackend->>JSONRPCBackend: Format Block with Transactions
JSONRPCBackend-->>Client: Return Block Data
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #53 +/- ##
==========================================
- Coverage 26.45% 26.43% -0.03%
==========================================
Files 112 112
Lines 11895 11905 +10
==========================================
Hits 3147 3147
- Misses 8301 8311 +10
Partials 447 447
|
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.
Actionable comments posted: 7
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (2)
- indexer/abci.go (1 hunks)
- jsonrpc/backend/block.go (2 hunks)
Additional context used
GitHub Check: codecov/patch
jsonrpc/backend/block.go
[warning] 120-125: jsonrpc/backend/block.go#L120-L125
Added lines #L120 - L125 were not covered by tests
[warning] 128-128: jsonrpc/backend/block.go#L128
Added line #L128 was not covered by tests
[warning] 146-152: jsonrpc/backend/block.go#L146-L152
Added lines #L146 - L152 were not covered by tests
[warning] 155-155: jsonrpc/backend/block.go#L155
Added line #L155 was not covered by tests
[warning] 158-158: jsonrpc/backend/block.go#L158
Added line #L158 was not covered by tests
[warning] 160-168: jsonrpc/backend/block.go#L160-L168
Added lines #L160 - L168 were not covered by testsindexer/abci.go
[warning] 140-145: indexer/abci.go#L140-L145
Added lines #L140 - L145 were not covered by tests
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.
if blockHeight > 1 { ... }
can be a problem if genesis height is higher than 0.. but still acceptable if you think it won't occur
Description
Closes: #XXXX
Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
!
in the type prefix if API or client breaking changeReviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
I have...
Summary by CodeRabbit
GetBlockByNumber
andGetBlockByHash
functions, allowing for flexible transaction detail retrieval based on user preference.