PPCoin: Immediate sync-checkpoint to defend against 51% mining attack
[novacoin.git] / src / main.cpp
index 7790c58..334125f 100644 (file)
@@ -59,7 +59,6 @@ int64 nHPSTimerStart;
 
 // Settings
 int64 nTransactionFee = MIN_TX_FEE;
-int64 nBalanceReserve = 0;
 
 
 
@@ -2092,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;
 }