Skip to content
This repository has been archived by the owner on Jan 21, 2022. It is now read-only.

Commit

Permalink
Fix infinite events. Fixes #56
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim Coulter authored and Tim Coulter committed Apr 12, 2016
1 parent 21f2a7a commit 6c18401
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion lib/reactiveblocktracker.js
Expand Up @@ -30,7 +30,9 @@ ReactiveBlockTracker.prototype.handleRequest = function(payload, next, end) {
function fetchBlock(cb) {
self.engine._fetchBlock("latest", function(err, block) {
if (err) return end(err);
self.engine._setCurrentBlock(block);
if (!self.engine.currentBlock || 0 !== self.engine.currentBlock.hash.compare(block.hash)) {
self.engine._setCurrentBlock(block);
}
cb();
});
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "ethereumjs-testrpc",
"version": "2.0.2",
"version": "2.0.3",
"bin": {
"testrpc": "./bin/testrpc"
},
Expand Down

0 comments on commit 6c18401

Please sign in to comment.