Skip to content
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: prefill last seen block state in timewatcher #1425

Merged
merged 1 commit into from
Mar 30, 2020

Conversation

kyriediculous
Copy link
Contributor

What does this pull request do? Explain your changes. (required)
Prefetch the state for lastSeenBlock in the timewatcher to prevent nil pointer errors when no blocks have elapsed and thus the state isn't populated through backfilling

Specific updates (required)

  • Added a StubBackend for testing
  • Added fetching last seen block number when calling timeWatcher.Watch()

How did you test each of these updates (required)
Added unit tests

Does this pull request close any open issues?
Fixes #1420

Checklist:

  • README and other documentation updated
  • Node runs in OSX and devenv
  • All tests in ./test.sh pass

eth/watchers/timewatcher.go Outdated Show resolved Hide resolved
eth/watchers/timewatcher.go Outdated Show resolved Hide resolved
eth/stubclient.go Outdated Show resolved Hide resolved
eth/stubclient.go Outdated Show resolved Hide resolved
eth/stubclient.go Outdated Show resolved Hide resolved
eth/watchers/timewatcher.go Outdated Show resolved Hide resolved
@kyriediculous
Copy link
Contributor Author

I see everything has been marked as resolved, can I rebase ?

Copy link
Member

@yondonfu yondonfu left a 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.

@kyriediculous
Copy link
Contributor Author

rebased

Copy link
Member

@yondonfu yondonfu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚢

@kyriediculous kyriediculous merged commit f60d6a9 into master Mar 30, 2020
@kyriediculous kyriediculous deleted the nv/last-round-nil branch March 30, 2020 21:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

panic: runtime error in version 0.5.5
2 participants