added duplicate block difference check

This commit is contained in:
cubedro 2015-06-02 00:21:09 +03:00
parent acdcd1330f
commit 868b93373c
1 changed files with 6 additions and 1 deletions

View File

@ -394,7 +394,12 @@ Node.prototype.validateLatestBlock = function (error, result, timeString)
{
console.warn("==>", "Got same block:", chalk.reset.cyan(block.number));
return false;
if( _.isEqual(JSON.stringify(this.stats.block), JSON.stringify(block)) )
return false;
console.log(this.stats.block);
console.log(block);
console.warn("Blocks are different... updating block");
}
console.success("==>", "Got block:", chalk.reset.red(block.number));