PPCoin: Track coinstake search interval in RPC command 'getdifficulty'
[novacoin.git] / src / init.cpp
index 65386e8..44e4f80 100644 (file)
@@ -10,6 +10,7 @@
 #include "init.h"
 #include "util.h"
 #include "ui_interface.h"
+#include "checkpoints.h"
 #include <boost/filesystem.hpp>
 #include <boost/filesystem/fstream.hpp>
 #include <boost/filesystem/convenience.hpp>
@@ -105,7 +106,6 @@ void HandleSIGTERM(int)
 // Start
 //
 #if !defined(QT_GUI)
-#if !defined(PPCOIN_GENESIS)
 int main(int argc, char* argv[])
 {
     bool fRet = false;
@@ -117,7 +117,6 @@ int main(int argc, char* argv[])
     return 1;
 }
 #endif
-#endif
 
 bool AppInit(int argc, char* argv[])
 {
@@ -585,6 +584,22 @@ bool AppInit2(int argc, char* argv[])
             ThreadSafeMessageBox(_("Warning: -paytxfee is set very high.  This is the transaction fee you will pay if you send a transaction."), _("PPCoin"), wxOK | wxICON_EXCLAMATION | wxMODAL);
     }
 
+    if (mapArgs.count("-reservebalance")) // ppcoin: reserve balance amount
+    {
+        int64 nReserveBalance = 0;
+        if (!ParseMoney(mapArgs["-reservebalance"], nReserveBalance))
+        {
+            ThreadSafeMessageBox(_("Invalid amount for -reservebalance=<amount>"), _("PPCoin"), wxOK | wxMODAL);
+            return false;
+        }
+    }
+
+    if (mapArgs.count("-checkpointkey")) // ppcoin: checkpoint master priv key
+    {
+        if (!Checkpoints::SetCheckpointPrivKey(GetArg("-checkpointkey", "")))
+            ThreadSafeMessageBox(_("Unable to sign checkpoint, wrong checkpointkey?\n"), _("PPCoin"), wxOK | wxMODAL);
+    }
+
     //
     // Start the node
     //