This release contains the new web3.eth.syncing
property and web3.eth.isSyncing(callback)
convenience function.
Note that the functionality in the nodes comes with the next release, so you can't use it just yet.
Example:
web3.eth.isSyncing(function(error, sync){
if(!error) {
// stop all app activity
if(sync === true) {
// we use `true`, so it stops all filters, but not the web3.eth.syncing polling
web3.reset(true);
// show sync info
} else if(sync) {
console.log(sync.currentBlock);
// re-gain app operation
} else {
// run your app init function...
}
}
});