lite2: actually run example tests + clock drift#4487
Merged
Conversation
clockDrift variable from the spec. 10s should cover most of the clients. References: - http://vancouver-webpages.com/time/web.html - https://blog.codinghorror.com/keeping-time-on-the-pc/
3e5a184 to
c28f427
Compare
golangcibot
reviewed
Feb 27, 2020
erikgrinaker
approved these changes
Feb 27, 2020
Contributor
erikgrinaker
left a comment
There was a problem hiding this comment.
LGTM, as long as the linter is appeased.
| UpdatePeriod(1*time.Second), | ||
| Logger(log.TestingLogger()), | ||
| UpdatePeriod(0), // NOTE: value should be greater than zero | ||
| // Logger(log.TestingLogger()), |
Contributor
There was a problem hiding this comment.
Why is this commented out?
Contributor
Author
There was a problem hiding this comment.
to suppress logger. otherwise you get:
got:
I[2020-02-27|16:15:46.267] Starting light client
I[2020-02-27|16:15:48.270] VerifyHeader height=562 hash=007C948D389C14724D28E542E159E7B98ADCB6D8C81DE62655C5EFA6092DEEC3 vals=8E84DAAFA6FFC6CEF14ADA4B34C12D6B7D28B559444EF6A4F96439E349417713
D[2020-02-27|16:15:48.270] Verify newHeader against trustedHeader trustedHeight=2 trustedHash=30CBED5E0A85457A6F850370899771F9372250AA6DCA0DF7824FB35C90B7A649 newHeight=562 newHash=007C948D389C14724D28E542E159E7B98ADCB6D8C81DE62655C5EFA6092DEEC3
I[2020-02-27|16:15:48.271] Advanced to new state height=562 hash=007C948D389C14724D28E542E159E7B98ADCB6D8C81DE62655C5EFA6092DEEC3
successful update
I[2020-02-27|16:15:48.271] Stopping light client
I[2020-02-27|16:15:48.271] Removing all the data
want:
successful update
Contributor
|
what about an example test for the auto update? |
Contributor
Author
you can investigate if you want. I think it's because we're stripping the monotonic part & using only a single instance (so not using medium time actually) |
cmwaters
approved these changes
Feb 27, 2020
Codecov Report
@@ Coverage Diff @@
## master #4487 +/- ##
=========================================
- Coverage 65.53% 65.43% -0.1%
=========================================
Files 228 228
Lines 20250 20259 +9
=========================================
- Hits 13270 13257 -13
- Misses 5927 5948 +21
- Partials 1053 1054 +1
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes: #4488
Description
For contributor use:
Updated CHANGELOG_PENDING.mdUpdated relevant documentation (docs/) and code commentsFiles changedin the Github PR explorer