Reorganize includes a bit
authorsvost <ya.nowa@yandex.ru>
Thu, 6 Oct 2016 09:05:08 +0000 (12:05 +0300)
committersvost <ya.nowa@yandex.ru>
Thu, 6 Oct 2016 09:05:08 +0000 (12:05 +0300)
src/checkpoints.cpp
src/kernel.cpp
src/kernel.h
src/kernel_worker.cpp
src/kernel_worker.h
src/main.cpp
src/main.h
src/wallet.h

index c308542..419da0a 100644 (file)
@@ -12,6 +12,8 @@
 
 using namespace std;
 
+extern unsigned int nStakeMinAge;
+
 namespace Checkpoints
 {
     typedef map<int, pair<uint256, unsigned int> > MapCheckpoints;
index 422c48e..d31bfe9 100644 (file)
@@ -9,11 +9,13 @@
 #include "kernel_worker.h"
 #include "txdb.h"
 
-extern uint32_t nStakeMaxAge;
 extern uint32_t nStakeTargetSpacing;
 
 using namespace std;
 
+uint32_t nStakeMinAge = 30 * nOneDay; // 30 days as zero time weight
+uint32_t nStakeMaxAge = 90 * nOneDay; // 90 days as full weight
+
 // Protocol switch time for fixed kernel modifier interval
 uint32_t nModifierSwitchTime  = 1413763200;    // Mon, 20 Oct 2014 00:00:00 GMT
 uint32_t nModifierTestSwitchTime = 1397520000; // Tue, 15 Apr 2014 00:00:00 GMT
index de4b52d..3649070 100644 (file)
@@ -4,8 +4,15 @@
 #ifndef PPCOIN_KERNEL_H
 #define PPCOIN_KERNEL_H
 
-#include "main.h"
-#include "wallet.h"
+#include "uint256.h"
+
+class CBlock;
+class CBlockIndex;
+class CTransaction;
+class COutPoint;
+
+extern uint32_t nStakeMinAge;
+extern uint32_t nStakeMaxAge;
 
 // ChainDB upgrade time
 extern uint32_t nModifierUpgradeTime;
index 25b73b8..f0cac66 100644 (file)
@@ -6,6 +6,8 @@
 #include "kernel.h"
 #include "kernel_worker.h"
 
+#include <openssl/sha.h>
+
 using namespace std;
 
 KernelWorker::KernelWorker(uint8_t *kernel, uint32_t nBits, uint32_t nInputTxTime, int64_t nValueIn, uint32_t nIntervalBegin, uint32_t nIntervalEnd)
index 38e8b05..bea8aa6 100644 (file)
@@ -3,6 +3,8 @@
 
 #include <vector>
 
+#include "bignum.h"
+
 
 class KernelWorker
 {
index a70c75a..4f1d2d8 100644 (file)
@@ -41,8 +41,6 @@ uint256 nPoWBase = uint256("0x00000000ffff00000000000000000000000000000000000000
 
 CBigNum bnProofOfWorkLimitTestNet(~uint256(0) >> 16);
 
-unsigned int nStakeMinAge = 30 * nOneDay; // 30 days as zero time weight
-unsigned int nStakeMaxAge = 90 * nOneDay; // 90 days as full weight
 unsigned int nStakeTargetSpacing = 10 * 60; // 10-minute stakes spacing
 unsigned int nModifierInterval = 6 * nOneHour; // time to elapse before new modifier is computed
 
index 0a5f02b..58596dc 100644 (file)
@@ -70,7 +70,6 @@ extern std::map<uint256, CBlockIndex*> mapBlockIndex;
 extern std::set<std::pair<COutPoint, unsigned int> > setStakeSeen;
 extern CBlockIndex* pindexGenesisBlock;
 extern unsigned int nNodeLifespan;
-extern unsigned int nStakeMinAge;
 extern int nCoinbaseMaturity;
 extern int nBestHeight;
 extern uint256 nBestChainTrust;
index 2e5e6d2..8298f78 100644 (file)
@@ -19,7 +19,6 @@
 #include "walletdb.h"
 #include "base58.h"
 
-extern unsigned int nStakeMaxAge;
 extern bool fWalletUnlockMintOnly;
 extern bool fConfChange;
 class CAccountingEntry;