We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8a008e1 commit 27347baCopy full SHA for 27347ba
1 file changed
tools/sync.js
@@ -19,7 +19,11 @@ var Transaction = mongoose.model( 'Transaction' );
19
//Just listen for latest blocks and sync from the start of the app.
20
**/
21
var listenBlocks = function(config) {
22
- var newBlocks = web3.eth.getBlock("latest");
+ var options = {
23
+ logIndex: "Number",
24
+ fromBlock: "latest",
25
+ };
26
+ var newBlocks = web3.eth.filter(options);
27
newBlocks.watch(function (error, blockHashOrNumber) {
28
if(error) {
29
console.log('Error: ' + error);
0 commit comments