#ifndef _BITCOINRPC_H_
#define _BITCOINRPC_H_ 1
-#include <string>
-#include <list>
-#include <map>
-
-class CBlockIndex;
+#include "checkpoints.h"
#include "json/json_spirit_reader_template.h"
#include "json/json_spirit_writer_template.h"
#include "json/json_spirit_utils.h"
-#include "util.h"
-#include "checkpoints.h"
+#include <string>
+#include <list>
+#include <map>
// HTTP status codes
enum HTTPStatusCode
#include "checkpoints.h"
#include "main.h"
#include "txdb-leveldb.h"
-#include "uint256.h"
#include <algorithm>
std::string CSyncCheckpoint::strMasterPrivKey = "";
// ppcoin: verify signature of sync-checkpoint message
+CSyncCheckpoint::CSyncCheckpoint()
+{
+ SetNull();
+}
+
+void CSyncCheckpoint::SetNull()
+{
+ CUnsignedSyncCheckpoint::SetNull();
+ vchMsg.clear();
+ vchSig.clear();
+}
+
+bool CSyncCheckpoint::IsNull() const
+{
+ return (hashCheckpoint == 0);
+}
+
+uint256 CSyncCheckpoint::GetHash() const
+{
+ return SerializeHash(*this);
+}
+
+bool CSyncCheckpoint::RelayTo(CNode *pnode) const
+{
+ // returns true if wasn't already sent
+ if (pnode->hashCheckpointKnown != hashCheckpoint)
+ {
+ pnode->hashCheckpointKnown = hashCheckpoint;
+ pnode->PushMessage("checkpoint", *this);
+ return true;
+ }
+ return false;
+}
+
bool CSyncCheckpoint::CheckSignature()
{
CPubKey key(ParseHex(CSyncCheckpoint::strMasterPubKey));
#ifndef BITCOIN_CHECKPOINT_H
#define BITCOIN_CHECKPOINT_H
-#include <map>
#include "util.h"
-#include "net.h"
+#include "sync.h"
+#include "uint256.h"
+
+#include <map>
// max 1 hour before latest block
static const int64_t CHECKPOINT_MAX_SPAN = nOneHour;
#undef ADVISORY
#endif
-class uint256;
class CBlockIndex;
class CSyncCheckpoint;
+class CNode;
/** Block-chain checkpoints are compiled-in sanity checks.
* They are updated every release or three.
std::vector<unsigned char> vchMsg;
std::vector<unsigned char> vchSig;
- CSyncCheckpoint()
- {
- SetNull();
- }
+ CSyncCheckpoint();
IMPLEMENT_SERIALIZE
(
READWRITE(vchSig);
)
- void SetNull()
- {
- CUnsignedSyncCheckpoint::SetNull();
- vchMsg.clear();
- vchSig.clear();
- }
-
- bool IsNull() const
- {
- return (hashCheckpoint == 0);
- }
-
- uint256 GetHash() const
- {
- return SerializeHash(*this);
- }
-
- bool RelayTo(CNode* pnode) const
- {
- // returns true if wasn't already sent
- if (pnode->hashCheckpointKnown != hashCheckpoint)
- {
- pnode->hashCheckpointKnown = hashCheckpoint;
- pnode->PushMessage("checkpoint", *this);
- return true;
- }
- return false;
- }
-
+ void SetNull();
+ bool IsNull() const;
+ uint256 GetHash() const;
+ bool RelayTo(CNode* pnode) const;
bool CheckSignature();
bool ProcessSyncCheckpoint(CNode* pfrom);
};
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "db.h"
-#include "net.h"
#include "util.h"
#include "main.h"
-#include "interface.h"
+
#include <boost/filesystem.hpp>
#include <boost/filesystem/fstream.hpp>
#ifndef BITCOIN_DB_H
#define BITCOIN_DB_H
-#include "main.h"
+#include "sync.h"
+#include "serialize.h"
+#include "script.h"
+
+#include <boost/filesystem/path.hpp>
#include <map>
#include <string>
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "kernel.h"
+#include "wallet.h"
#include "kernel_worker.h"
#include "txdb-leveldb.h"
-extern unsigned int nStakeMaxAge;
extern unsigned int nStakeTargetSpacing;
using namespace std;
#define PPCOIN_KERNEL_H
#include "main.h"
-#include "wallet.h"
+
+extern unsigned int nStakeMaxAge;
// ChainDB upgrade time
extern unsigned int nModifierUpgradeTime;
return std::min(nIntervalEnd - nIntervalBeginning - nStakeMinAge, (int64_t)nStakeMaxAge);
}
-#endif // PPCOIN_KERNEL_H
\ No newline at end of file
+#endif // PPCOIN_KERNEL_H
-#include <vector>
-#include <inttypes.h>
#include "uint256.h"
-#include "bignum.h"
#include "kernel.h"
#include "kernel_worker.h"
#ifndef NOVACOIN_KERNELWORKER_H
#define NOVACOIN_KERNELWORKER_H
+#include "bignum.h"
+
+#include <cstdint>
#include <vector>
+class uint256;
+
class KernelWorker
{
public:
// Scan given kernel for solutions
bool ScanKernelBackward(unsigned char *kernel, uint32_t nBits, uint32_t nInputTxTime, int64_t nValueIn, std::pair<uint32_t, uint32_t> &SearchInterval, std::pair<uint256, uint32_t> &solution);
-#endif // NOVACOIN_KERNELWORKER_H
\ No newline at end of file
+#endif // NOVACOIN_KERNELWORKER_H
// 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 "alert.h"
#include "checkpoints.h"
#include "db.h"
#include "interface.h"
#include "checkqueue.h"
#include "kernel.h"
+
#include <boost/filesystem.hpp>
#include <boost/filesystem/fstream.hpp>
-#include "main.h"
-
#include <regex>
using namespace std;
#ifndef BITCOIN_MAIN_H
#define BITCOIN_MAIN_H
-#include <algorithm>
-
#include "timestamps.h"
#include "sync.h"
#include "net.h"
#include "script.h"
#include "scrypt.h"
+#include <algorithm>
#include <limits>
#include <list>
#include <map>
#include "miner.h"
#include "kernel.h"
#include "kernel_worker.h"
+#include "wallet.h"
//////////////////////////////////////////////////////////////////////////////
// Copyright (c) 2009-2012 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
#include "interface.h"
-#include "init.h"
-#include "bitcoinrpc.h"
#include <string>
// Distributed under the MIT/X11 software license, see the accompanying
// file license.txt or http://www.opensource.org/licenses/mit-license.php.
-#include <map>
+#include "txdb-leveldb.h"
+#include "kernel.h"
+#include "checkpoints.h"
#include <boost/version.hpp>
#include <boost/filesystem.hpp>
#include <leveldb/filter_policy.h>
#include <memenv/memenv.h>
-#include "kernel.h"
-#include "checkpoints.h"
-#include "txdb-leveldb.h"
-#include "util.h"
-#include "main.h"
-
using namespace std;
leveldb::DB *txdb; // global pointer for LevelDB object instance
#ifndef BITCOIN_LEVELDB_H
#define BITCOIN_LEVELDB_H
-#include "main.h"
+#include "serialize.h"
#include <map>
#include <string>
#include <leveldb/db.h>
#include <leveldb/write_batch.h>
+class CBigNum;
+class CDiskBlockIndex;
+class COutPoint;
+class CTxIndex;
+class CTransaction;
+class uint256;
+class CDiskTxPos;
+
// Class that provides access to a LevelDB. Note that this class is frequently
// instantiated on the stack and then destroyed again, so instantiation has to
// be very cheap. Unfortunately that means, a CTxDB instance is actually just a