-
Notifications
You must be signed in to change notification settings - Fork 867
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
Extend block parameter methods to accept 'finalized' and 'safe' as block tags #3950
Conversation
…ock tags Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
337e94e
to
c8b0d8e
Compare
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
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.
LGTM presuming a change in the changelog and restoring the 'if/else if' chaining
CHANGELOG.md
Outdated
@@ -4,6 +4,7 @@ | |||
|
|||
### Additions and Improvements | |||
- \[EXPERIMENTAL\] Add checkpoint sync `--sync-mode="X_CHECKPOINT"` [#3849](https://github.com/hyperledger/besu/pull/3849) | |||
- Support `latest` and `safe` as tags for the block parameter in RPC APIs [#3950](https://github.com/hyperledger/besu/pull/3950) |
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.
s/latest/finalized/
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.
done
// If block parameter is not numeric or latest, it is pending. | ||
result = pendingResult(request); | ||
return resultByBlockNumber(request, blockNumber.get()); | ||
} |
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.
Style wise these should remain if/else chained. They are not proper "guard blocks" and readability would be improved by retaining the if/elseif/elseif chain. Bringing in the last return as an else would further improve the readability.
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.
done
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
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.
ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/AbstractBlockParameterMethod.java
what do you mean? |
…ock tags (hyperledger#3950) Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Signed-off-by: Fabio Di Fabio fabio.difabio@consensys.net
PR description
Fixed Issue(s)
fixes #3947
Documentation
doc-change-required
label to this PR ifupdates are required.
Changelog