Skip to content

Commit 8a008e1

Browse files
committed
Get last block# not hash
1 parent bfd0d55 commit 8a008e1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tools/sync.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ 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.filter("latest");
22+
var newBlocks = web3.eth.getBlock("latest");
2323
newBlocks.watch(function (error, blockHashOrNumber) {
2424
if(error) {
2525
console.log('Error: ' + error);

0 commit comments

Comments
 (0)