-
Notifications
You must be signed in to change notification settings - Fork 839
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
Implemented private log filter JSON-RPC methods #735
Implemented private log filter JSON-RPC methods #735
Conversation
4362e0a
to
305e545
Compare
Signed-off-by: Lucas Saldanha <lucas.saldanha@consensys.net>
305e545
to
705af02
Compare
|
||
private void addMatchingLogs(final LogFilter filter) { | ||
final long headBlockNumber = blockchainQueries.headBlockNumber(); | ||
private void addNewMatchingLogs(final LogFilter filter) { |
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.
I renamed this method to clarify that we will only be looking for new logs here. The fromBlockNumber
is set to the head of the chain.
return findLogsWithinRange(filter, fromBlockNumber, toBlockNumber); | ||
} | ||
|
||
private List<LogWithMetadata> findLogsWithinRange( |
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.
This method was introduced to avoid duplication. It is used by two methods in this class.
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.
Left a few comments, please have a look!
...va/org/hyperledger/besu/ethereum/api/jsonrpc/internal/privacy/methods/PrivGetFilterLogs.java
Show resolved
Hide resolved
...perledger/besu/ethereum/api/jsonrpc/internal/privacy/methods/priv/PrivGetFilterLogsTest.java
Outdated
Show resolved
Hide resolved
...ledger/besu/ethereum/api/jsonrpc/internal/privacy/methods/priv/PrivGetFilterChangesTest.java
Outdated
Show resolved
Hide resolved
...g/hyperledger/besu/ethereum/api/jsonrpc/internal/privacy/methods/priv/PrivNewFilterTest.java
Show resolved
Hide resolved
...rledger/besu/ethereum/api/jsonrpc/internal/privacy/methods/priv/PrivUninstallFilterTest.java
Show resolved
Hide resolved
Signed-off-by: Lucas Saldanha <lucas.saldanha@consensys.net>
Fixes #627
Implemented the following JSON-RPC methods:
• priv_installFilter
• priv_uninstallFilter
• priv_getFilterLogs
• priv_getFilterChanges
ATs will be implemented in a separate PR.