-
Notifications
You must be signed in to change notification settings - Fork 164
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
eth/blockwatch: BackfillStartBlock option #1157
Conversation
7b53fe4 adds a unit test for when there is no last retained block and no defined value for |
5cba1fe adds support for determining the
|
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.
Changes look good - let's rebase
32f819a
to
7d21c32
Compare
rebased !
…On Wed, Nov 13, 2019 at 9:09 PM Yondon Fu ***@***.***> wrote:
***@***.**** commented on this pull request.
Changes look good - let's rebase
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1157?email_source=notifications&email_token=AFJZZWTTU37EHCSJ7W64E4TQTRNHRA5CNFSM4JISG572YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCLO4JBY#pullrequestreview-316523655>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFJZZWSW5XDVXXXWT7GINRDQTRNHRANCNFSM4JISG57Q>
.
|
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 🚢
What does this pull request do? Explain your changes. (required)
This PR updates the
blockwatch
package with a config option to start backfilling missed events from a certain block height, whereas previously backfilling would happen from the last retained block on the stack (in the DB in our case), if present.blockwatchBackfillStartBlock
defined inlivepeer.go
this is currently set to0
and should lead to an up to date view for the nodeThe one caveat is that this strategy makes some of the bash tests that use mainnet/rinkeby take quite a while since it starts backfilling from genesis...
Specific updates (required)
BackFillStartBlock *big.Int
field toblockwatch.Config
watcher.getMissedEventsToBackfill()
to start backfilling fromwatcher.backFillStartBlock
if defined, otherwise continue operating as before the changes this PR makesconfig.BackfillStartBlock
is definedSenderWatcher
to not process events when backfilling because it will just lead to no-ops anyway (mapping is empty when starting the node)How did you test each of these updates (required)
Ran unit tests
Does this pull request close any open issues?
Fixes #1149
Checklist:
./test.sh
pass