mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-22 03:55:53 +00:00
Add LeakChecked qualifiers to key classes
This commit is contained in:
@@ -11,7 +11,9 @@
|
||||
// Async https client.
|
||||
//
|
||||
|
||||
class HttpsClient : public boost::enable_shared_from_this<HttpsClient>
|
||||
class HttpsClient
|
||||
: public boost::enable_shared_from_this <HttpsClient>
|
||||
, LeakChecked <HttpsClient>
|
||||
{
|
||||
public:
|
||||
HttpsClient (
|
||||
|
||||
@@ -179,7 +179,7 @@ bool LedgerMaster::haveLedgerRange (uint32 from, uint32 to)
|
||||
{
|
||||
boost::recursive_mutex::scoped_lock sl (mLock);
|
||||
uint32 prevMissing = mCompleteLedgers.prevMissing (to + 1);
|
||||
return (prevMissing == RangeSet::RangeSetAbsent) || (prevMissing < from);
|
||||
return (prevMissing == RangeSet::absent) || (prevMissing < from);
|
||||
}
|
||||
|
||||
bool LedgerMaster::haveLedger (uint32 seq)
|
||||
@@ -202,7 +202,7 @@ bool LedgerMaster::getValidatedRange (uint32& minVal, uint32& maxVal)
|
||||
|
||||
minVal = mCompleteLedgers.prevMissing (maxVal);
|
||||
|
||||
if (minVal == RangeSet::RangeSetAbsent)
|
||||
if (minVal == RangeSet::absent)
|
||||
minVal = 0;
|
||||
else
|
||||
++minVal;
|
||||
@@ -440,7 +440,7 @@ void LedgerMaster::resumeAcquiring ()
|
||||
|
||||
uint32 prevMissing = mCompleteLedgers.prevMissing (mFinalizedLedger->getLedgerSeq ());
|
||||
|
||||
if (prevMissing == RangeSet::RangeSetAbsent)
|
||||
if (prevMissing == RangeSet::absent)
|
||||
{
|
||||
WriteLog (lsDEBUG, LedgerMaster) << "no prior missing ledger, not resuming";
|
||||
return;
|
||||
@@ -564,7 +564,7 @@ void LedgerMaster::setFullLedger (Ledger::pointer ledger)
|
||||
{
|
||||
uint32 prevMissing = mCompleteLedgers.prevMissing (ledger->getLedgerSeq ());
|
||||
|
||||
if (prevMissing == RangeSet::RangeSetAbsent)
|
||||
if (prevMissing == RangeSet::absent)
|
||||
{
|
||||
WriteLog (lsDEBUG, LedgerMaster) << "no prior missing ledger";
|
||||
return;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
// VFALCO TODO Rename to Ledgers
|
||||
// It sounds like this holds all the ledgers...
|
||||
//
|
||||
class LedgerMaster
|
||||
class LedgerMaster : LeakChecked <LedgerMaster>
|
||||
{
|
||||
public:
|
||||
typedef FUNCTION_TYPE <void (Ledger::ref)> callback;
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
class Peer;
|
||||
class LedgerConsensus;
|
||||
|
||||
class NetworkOPs
|
||||
class NetworkOPs : LeakChecked <NetworkOPs>
|
||||
{
|
||||
public:
|
||||
enum Fault
|
||||
|
||||
@@ -34,7 +34,7 @@ private:
|
||||
boost::recursive_mutex mLock;
|
||||
};
|
||||
|
||||
class OrderBookDB
|
||||
class OrderBookDB : LeakChecked <OrderBookDB>
|
||||
{
|
||||
public:
|
||||
OrderBookDB ();
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
Handles incoming connections from other Peers
|
||||
*/
|
||||
|
||||
class PeerDoor
|
||||
class PeerDoor : LeakChecked <PeerDoor>
|
||||
{
|
||||
public:
|
||||
PeerDoor (boost::asio::io_service& io_service);
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
Handles incoming connections from people making RPC Requests
|
||||
*/
|
||||
|
||||
class RPCDoor
|
||||
class RPCDoor : LeakChecked <RPCDoor>
|
||||
{
|
||||
public:
|
||||
explicit RPCDoor (boost::asio::io_service& io_service);
|
||||
|
||||
@@ -7,7 +7,9 @@
|
||||
#ifndef __RPCSERVER__
|
||||
#define __RPCSERVER__
|
||||
|
||||
class RPCServer : public boost::enable_shared_from_this<RPCServer>
|
||||
class RPCServer
|
||||
: public boost::enable_shared_from_this<RPCServer>
|
||||
, LeakChecked <RPCServer>
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
@@ -10,7 +10,9 @@
|
||||
#define RPC_EVENT_QUEUE_MAX 32
|
||||
|
||||
// Subscription object for JSON-RPC
|
||||
class RPCSub : public InfoSub
|
||||
class RPCSub
|
||||
: public InfoSub
|
||||
, LeakChecked <RPCSub>
|
||||
{
|
||||
public:
|
||||
typedef boost::shared_ptr<RPCSub> pointer;
|
||||
|
||||
@@ -20,7 +20,7 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
class SNTPClient
|
||||
class SNTPClient : LeakChecked <SNTPClient>
|
||||
{
|
||||
public:
|
||||
SNTPClient (boost::asio::io_service& service);
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
// Tracks all transactions in memory
|
||||
|
||||
class TransactionMaster
|
||||
class TransactionMaster : LeakChecked <TransactionMaster>
|
||||
{
|
||||
public:
|
||||
TransactionMaster ();
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#ifndef RIPPLE_TRANSACTIONMETA_H
|
||||
#define RIPPLE_TRANSACTIONMETA_H
|
||||
|
||||
class TransactionMetaSet
|
||||
class TransactionMetaSet : LeakChecked <TransactionMetaSet>
|
||||
{
|
||||
public:
|
||||
typedef boost::shared_ptr<TransactionMetaSet> pointer;
|
||||
|
||||
@@ -53,7 +53,7 @@ private:
|
||||
void addCallbacks (const TXQEntry& otherEntry);
|
||||
};
|
||||
|
||||
class TXQueue
|
||||
class TXQueue : LeakChecked <TXQueue>
|
||||
{
|
||||
public:
|
||||
TXQueue () : mRunning (false)
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#ifndef RIPPLE_WSDOOR_RIPPLEHEADER
|
||||
#define RIPPLE_WSDOOR_RIPPLEHEADER
|
||||
|
||||
class WSDoor
|
||||
class WSDoor : LeakChecked <WSDoor>
|
||||
{
|
||||
private:
|
||||
websocketpp::server_autotls* mSEndpoint;
|
||||
|
||||
@@ -23,7 +23,9 @@ struct WSServerHandlerLog;
|
||||
// This instance dispatches all events. There is no per connection persistence.
|
||||
|
||||
template <typename endpoint_type>
|
||||
class WSServerHandler : public endpoint_type::handler
|
||||
class WSServerHandler
|
||||
: public endpoint_type::handler
|
||||
, LeakChecked <WSServerHandler <endpoint_type> >
|
||||
{
|
||||
public:
|
||||
typedef typename endpoint_type::handler::connection_ptr connection_ptr;
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
/** A set of AccountItem objects.
|
||||
*/
|
||||
class AccountItems
|
||||
class AccountItems : LeakChecked <AccountItems>
|
||||
{
|
||||
public:
|
||||
typedef boost::shared_ptr <AccountItems> pointer;
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
// Provide abstract access to an account's state, such that access to the serialized format is hidden.
|
||||
//
|
||||
|
||||
class AccountState
|
||||
class AccountState : LeakChecked <AccountState>
|
||||
{
|
||||
public:
|
||||
typedef boost::shared_ptr<AccountState> pointer;
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
*/
|
||||
// VFALCO TODO rename to SortedTxSet
|
||||
class CanonicalTXSet
|
||||
class CanonicalTXSet : LeakChecked <CanonicalTXSet>
|
||||
{
|
||||
public:
|
||||
class Key
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
/** Persistency layer for hashed objects.
|
||||
*/
|
||||
// VFALCO TODO Move all definitions to the .cpp
|
||||
class HashedObjectStore
|
||||
class HashedObjectStore : LeakChecked <HashedObjectStore>
|
||||
{
|
||||
public:
|
||||
HashedObjectStore (int cacheSize, int cacheAge);
|
||||
|
||||
@@ -20,7 +20,7 @@ enum POWResult
|
||||
// VFALCO TODO move this to the class as a static member and rename it
|
||||
bool powResultInfo (POWResult powCode, std::string& strToken, std::string& strHuman);
|
||||
|
||||
class IProofOfWorkFactory
|
||||
class IProofOfWorkFactory : LeakChecked <IProofOfWorkFactory>
|
||||
{
|
||||
public:
|
||||
typedef boost::bimap< boost::bimaps::multiset_of<time_t>, boost::bimaps::unordered_set_of<uint256> > powMap_t;
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
typedef boost::unordered_map<uint160, SerializedValidation::pointer> ValidationSet;
|
||||
typedef std::pair<int, uint160> currentValidationCount; // nodes validating and highest node ID validating
|
||||
|
||||
class IValidations
|
||||
class IValidations : LeakChecked <IValidations>
|
||||
{
|
||||
public:
|
||||
static IValidations* New ();
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
*/
|
||||
// VFALCO TODO Rename to InboundLedgers
|
||||
// VFALCO TODO Create abstract interface
|
||||
class InboundLedgers
|
||||
class InboundLedgers : LeakChecked <InboundLedger>
|
||||
{
|
||||
public:
|
||||
// How long before we try again to acquire the same ledger
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#define RIPPLE_LEDGERHISTORY_H
|
||||
|
||||
// VFALCO TODO Rename to OldLedgers ?
|
||||
class LedgerHistory
|
||||
class LedgerHistory : LeakChecked <LedgerHistory>
|
||||
{
|
||||
public:
|
||||
LedgerHistory ();
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
/** Holds the cryptographic credentials identifying this instance of the server.
|
||||
*/
|
||||
class LocalCredentials // derive from Uncopyable
|
||||
class LocalCredentials : Uncopyable
|
||||
{
|
||||
public:
|
||||
LocalCredentials ();
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
/** Describes a serialized ledger entry for an order book.
|
||||
*/
|
||||
class OrderBook
|
||||
class OrderBook : LeakChecked <OrderBook>
|
||||
{
|
||||
public:
|
||||
typedef boost::shared_ptr <OrderBook> pointer;
|
||||
|
||||
@@ -10,7 +10,9 @@
|
||||
// VFALCO TODO Couldn't this be a struct?
|
||||
typedef std::pair <std::string, int> ipPort;
|
||||
|
||||
class Peer : public boost::enable_shared_from_this <Peer>
|
||||
class Peer
|
||||
: public boost::enable_shared_from_this <Peer>
|
||||
, LeakChecked <Peer>
|
||||
{
|
||||
public:
|
||||
typedef boost::shared_ptr<Peer> pointer;
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
A peer set is used to acquire a ledger or a transaction set.
|
||||
*/
|
||||
class PeerSet
|
||||
class PeerSet : LeakChecked <PeerSet>
|
||||
{
|
||||
public:
|
||||
uint256 const& getHash () const
|
||||
|
||||
@@ -14,7 +14,9 @@ class Peers;
|
||||
|
||||
SETUP_LOG (Peers)
|
||||
|
||||
class Peers : public IPeers
|
||||
class Peers
|
||||
: public IPeers
|
||||
, LeakChecked <Peers>
|
||||
{
|
||||
public:
|
||||
explicit Peers (boost::asio::io_service& io_service)
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#ifndef RIPPLE_PROOFOFWORK_H
|
||||
#define RIPPLE_PROOFOFWORK_H
|
||||
|
||||
class ProofOfWork
|
||||
class ProofOfWork : LeakChecked <ProofOfWork>
|
||||
{
|
||||
public:
|
||||
static const int sMaxDifficulty;
|
||||
|
||||
@@ -9,7 +9,9 @@
|
||||
|
||||
// PRIVATE HEADER
|
||||
|
||||
class ProofOfWorkFactory : public IProofOfWorkFactory
|
||||
class ProofOfWorkFactory
|
||||
: public IProofOfWorkFactory
|
||||
, LeakChecked <ProofOfWorkFactory>
|
||||
{
|
||||
public:
|
||||
ProofOfWorkFactory ();
|
||||
|
||||
@@ -6,10 +6,12 @@
|
||||
|
||||
#ifndef RIPPLE_VERSION_H
|
||||
#define RIPPLE_VERSION_H
|
||||
|
||||
//
|
||||
// Versions
|
||||
//
|
||||
|
||||
// VFALCO TODO Roll this together into ripple_BuildVersion
|
||||
#define SERVER_VERSION_MAJOR 0
|
||||
#define SERVER_VERSION_MINOR 9
|
||||
#define SERVER_VERSION_SUB "-b"
|
||||
|
||||
Reference in New Issue
Block a user