Significant rewrite of eth-block-tracker
. Primary reason was optimizing network IO.
BlockTrackers no longer have manual stop/start methods, they now automatically start and stop based on listener count for the latest
and sync
events. You can force a stop by calling the EventEmitter
method removeAllListeners
.
Events now only return the block number. Internal polling is done via eth_blockNumber
.
The block
event has been removed, please use latest
or sync
.
- added isRunning
- added
error
event - renamed awaitCurrentBlock -> getLatestBlock
- removed tx body from block
- removed getTrackingBlock
- removed start/stop
- removed
block
event - removed test/util/testBlockMiddleware
- npm module main now exports unprocessed source
- module includes dist:
- bundle:
dist/EthBlockTracker.js
- es5 source:
dist/es5/
- bundle:
- fixes
awaitCurrentBlock
return value lib
renamed tosrc
eth-block-tracker
is now a normalEventEmitter
, does not provide a callback to event handlers