Move 'nTransactionFee' to wallet.cpp
[novacoin.git] / src / rpcblockchain.cpp
index 8433ad3..e1ef171 100644 (file)
@@ -3,7 +3,7 @@
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#include "main.h"
+#include "wallet.h"
 #include "bitcoinrpc.h"
 #include <boost/filesystem.hpp>
 #include <boost/iostreams/device/file.hpp>
@@ -93,7 +93,7 @@ double GetPoSKernelPS()
         pindex = pindex->pprev;
     }
 
-    if (!nStakesHandled)
+    if (!nStakesHandled || nStakesTime == 0)
         return 0;
 
     return dStakeKernelsTriedAvg / nStakesTime;
@@ -394,13 +394,13 @@ Value getcheckpoint(const Array& params, bool fHelp)
     }
 
     // Check that the block satisfies synchronized checkpoint
-    if (CheckpointsMode == Checkpoints::STRICT)
+    if (CheckpointsMode == Checkpoints::CP_STRICT)
         result.push_back(Pair("policy", "strict"));
 
-    if (CheckpointsMode == Checkpoints::ADVISORY)
+    if (CheckpointsMode == Checkpoints::CP_ADVISORY)
         result.push_back(Pair("policy", "advisory"));
 
-    if (CheckpointsMode == Checkpoints::PERMISSIVE)
+    if (CheckpointsMode == Checkpoints::CP_PERMISSIVE)
         result.push_back(Pair("policy", "permissive"));
 
     if (mapArgs.count("-checkpointkey"))