feat: get logs from a fork network directly#3692
feat: get logs from a fork network directly#3692adjisb wants to merge 1 commit intoConsenSys-archive:developfrom
Conversation
|
This looks like it's not quiet ready for review as you've introduced some new |
|
Ok, I will remove the TODOs, they are related to some bugs in the block-manager.ts and can be fixed in other PRs. |
| async getLogs(filter: FilterArgs): Promise<Ethereum.Logs> { | ||
| const blockchain = this.#blockchain; | ||
| if ("blockHash" in filter) { | ||
| // TODO: revert back to getNumberFromHash (when they add support for fallback/forks) |
There was a problem hiding this comment.
This depends on a fix on block-manager.
| pendingLogsPromises.push(this.get(Quantity.toBuffer(i))); | ||
| } | ||
| } | ||
| // TODO: Use block-manager earliest when fixed (currently it doesn't support fallback/fork correctly) |
There was a problem hiding this comment.
This depends on a fix on block-manager.
| async getLogs(filter: FilterArgs): Promise<Ethereum.Logs> { | ||
| const blockchain = this.#blockchain; | ||
| if ("blockHash" in filter) { | ||
| // TODO: revert back to getNumberFromHash (when they add support for fallback/forks) |
There was a problem hiding this comment.
This depends on a fix on block-manager.
What are the bugs? |
|
getNumberFromHash is called from api.eth_getBlockTransactionCountByHash but it doesn't support forks, so I used getByHash. |
No description provided.