Skip to content

Commit 27347ba

Browse files
committed
filter fix
1 parent 8a008e1 commit 27347ba

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

tools/sync.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,11 @@ var Transaction = mongoose.model( 'Transaction' );
1919
//Just listen for latest blocks and sync from the start of the app.
2020
**/
2121
var listenBlocks = function(config) {
22-
var newBlocks = web3.eth.getBlock("latest");
22+
var options = {
23+
logIndex: "Number",
24+
fromBlock: "latest",
25+
};
26+
var newBlocks = web3.eth.filter(options);
2327
newBlocks.watch(function (error, blockHashOrNumber) {
2428
if(error) {
2529
console.log('Error: ' + error);

0 commit comments

Comments
 (0)