Fixes bug where an Ethereum node giving bad answers could break things. #18
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.
This changes the way we announce block/log additions/removals so that we wait until we are sure we can fully synch with the node before doing any announcements. This allows us to rollback when the Ethereum node gives us something weird in response such as a claim that a parent block doesn't exist, or logs that don't line up with the expected block.
Reorders block/log additions/removals. It now guarantees that you'll receive block addition announcements before receiving log addition announcements for that block and you'll receive log removal announcements before receiving block removal announcements for that block.
No longer does console.log when an error occurs, instead calls the optional user provided
onError
. This cleans up the tests, and also allows the user to do something more useful with errors like track them externally.Removes deprecated ES5 callback stuff.