Count some more class instances.

This commit is contained in:
JoelKatz
2012-11-01 08:46:04 -07:00
parent 7372d4423f
commit 7c346c8d4a
7 changed files with 21 additions and 4 deletions

View File

@@ -11,6 +11,7 @@
#include "HashPrefixes.h"
SETUP_LOG();
DECLARE_INSTANCE(PeerSet);
#define LA_DEBUG
#define LEDGER_ACQUIRE_TIMEOUT 750

View File

@@ -14,9 +14,12 @@
#include "Ledger.h"
#include "Peer.h"
#include "TaggedCache.h"
#include "InstanceCounter.h"
#include "../obj/src/ripple.pb.h"
class PeerSet
DEFINE_INSTANCE(PeerSet);
class PeerSet : private IS_INSTANCE(PeerSet)
{
protected:
uint256 mHash;

View File

@@ -24,6 +24,7 @@ typedef std::pair<const uint160, LedgerProposal::pointer> u160_prop_pair;
typedef std::pair<const uint256, LCTransaction::pointer> u256_lct_pair;
SETUP_LOG();
DECLARE_INSTANCE(LedgerConsensus);
TransactionAcquire::TransactionAcquire(const uint256& hash) : PeerSet(hash, TX_ACQUIRE_TIMEOUT), mHaveRoot(false)
{

View File

@@ -17,6 +17,9 @@
#include "Peer.h"
#include "CanonicalTXSet.h"
#include "TransactionEngine.h"
#include "InstanceCounter.h"
DEFINE_INSTANCE(LedgerConsensus);
class TransactionAcquire : public PeerSet, public boost::enable_shared_from_this<TransactionAcquire>
{ // A transaction set we are trying to acquire
@@ -78,7 +81,7 @@ enum LCState
lcsACCEPTED, // We have accepted/validated a new last closed ledger
};
class LedgerConsensus : public boost::enable_shared_from_this<LedgerConsensus>
class LedgerConsensus : public boost::enable_shared_from_this<LedgerConsensus>, IS_INSTANCE(LedgerConsensus)
{
protected:
LCState mState;

View File

@@ -7,6 +7,8 @@
#include "Log.h"
SETUP_LOG();
DECLARE_INSTANCE(LedgerEntrySetEntry);
DECLARE_INSTANCE(LedgerEntrySet)
// #define META_DEBUG

View File

@@ -7,6 +7,10 @@
#include "TransactionMeta.h"
#include "Ledger.h"
#include "TransactionErr.h"
#include "InstanceCounter.h"
DEFINE_INSTANCE(LedgerEntrySetEntry);
DEFINE_INSTANCE(LedgerEntrySet);
enum LedgerEntryAction
{
@@ -17,7 +21,7 @@ enum LedgerEntryAction
taaCREATE, // Newly created.
};
class LedgerEntrySetEntry
class LedgerEntrySetEntry : private IS_INSTANCE(LedgerEntrySetEntry)
{
public:
SLE::pointer mEntry;
@@ -28,7 +32,7 @@ public:
};
class LedgerEntrySet
class LedgerEntrySet : private IS_INSTANCE(LedgerEntrySet)
{
protected:
Ledger::pointer mLedger;

View File

@@ -9,6 +9,9 @@
#include "Config.h"
#include "Application.h"
#define CACHED_LEDGER_NUM 3 // TEMPORARY REMOVEME FIXME
#define CACHED_LEDGER_AGE 60 // TEMPORARY REMOVEME FIXME
#ifndef CACHED_LEDGER_NUM
#define CACHED_LEDGER_NUM 512
#endif