Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dalslandan200/b6c9efc2aad2c73c980fa1cb51c69612 to your computer and use it in GitHub Desktop.
Save dalslandan200/b6c9efc2aad2c73c980fa1cb51c69612 to your computer and use it in GitHub Desktop.
Bitpay insight altcoin p2p alt hashing hotfix
var blockHash = bitcoreUtil.formatHashFull(block.calcHash());
var check = blockHash.substring(0, 4);
if (check != '0000') {
console.log("Scrypt block detected. Falling back to RPC");
self.historicSync.start({forceRPC:1}, function(){
sockets.broadcastSyncInfo(self.historicSync.info());
self.log('[p2p_sync] Done resync.');
});
return;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment