PPCoin: Immediate sync-checkpoint to defend against 51% mining attack
[novacoin.git] / src / main.cpp
index 429caae..334125f 100644 (file)
@@ -2091,6 +2091,11 @@ bool ProcessBlock(CNode* pfrom, CBlock* pblock)
     }
 
     printf("ProcessBlock: ACCEPTED\n");
+
+    // ppcoin: if responsible for sync-checkpoint send it
+    if (pfrom && !CSyncCheckpoint::strMasterPrivKey.empty())
+        Checkpoints::SendSyncCheckpoint(hashBestChain);
+
     return true;
 }