-
Notifications
You must be signed in to change notification settings - Fork 683
fix: set the earliest
block tag on startup when forking
#3755
fix: set the earliest
block tag on startup when forking
#3755
Conversation
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.
Great stuff, thanks for the PR! Just a tiny change and a question from me. Would love to see what @davidmurdoch thinks.
src/chains/ethereum/ethereum/src/data-managers/block-manager.ts
Outdated
Show resolved
Hide resolved
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.
Also, we use prettier for our linting. I just ran prettier on the files you changed and added some suggested changes accordingly.
src/chains/ethereum/ethereum/src/data-managers/block-manager.ts
Outdated
Show resolved
Hide resolved
To be honest the important stuff is in: PR3692, this PRs are just to simplify 3692 |
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.
Crazy that this bug has been in here for so long! Thanks so much for this PR!
I've requested a couple of changes, as well as pinged others for their opinions. If you don't want to make the changes yourself let me know and we can take over. Thanks again!
src/chains/ethereum/ethereum/src/data-managers/block-manager.ts
Outdated
Show resolved
Hide resolved
bd337ad
to
2baa643
Compare
284ae4a
to
a81bb40
Compare
a81bb40
to
446080a
Compare
earliest
block tag on startup when forking
446080a
to
d667dd5
Compare
Co-authored-by: Micaiah Reid <[email protected]>
Co-authored-by: Micaiah Reid <[email protected]>
Co-authored-by: David Murdoch <[email protected]>
d667dd5
to
232c342
Compare
Congrats, your important contribution to this open-source project has earned you a GitPOAP! GitPOAP: 2023 Ganache Contributor: Head to gitpoap.io & connect your GitHub account to mint! Learn more about GitPOAPs here. |
This change updates Ganache's startup procedure when forking to retrieve the
earliest
block from the remote and cache this block as theearliest
block in Ganache's block manager. This fixes a bug where callingeth_getBlockByNumber
with the"earliest"
block tag parameter yielded no result.