Reformat annotations in preparation for automated extraction

This commit is contained in:
Vinnie Falco
2013-06-07 14:46:09 -07:00
parent 6d8ee90a8d
commit a6fdabc68a
89 changed files with 192 additions and 192 deletions

View File

@@ -124,7 +124,7 @@ int SqliteDatabase::getNumRowsAffected()
return(0);
}
// VFALCO: TODO, This must be fixed!!! return value needs to be int64
// VFALCO TODO This must be fixed!!! return value needs to be int64
//
int SqliteDatabase::getLastInsertID()
{

View File

@@ -26,7 +26,7 @@ public:
std::vector<unsigned char> getRaw() const;
// VFALCO: TODO make an accessor for mLedgerEntry so we can change protected to private
// VFALCO TODO make an accessor for mLedgerEntry so we can change protected to private
protected:
SerializedLedgerEntry::pointer mLedgerEntry;
};

View File

@@ -1,5 +1,5 @@
// VFALCO: TODO Replace these with beast "unsigned long long" generators
// VFALCO TODO Replace these with beast "unsigned long long" generators
#define SYSTEM_CURRENCY_GIFT 1000ull
#define SYSTEM_CURRENCY_USERS 100000000ull
#define SYSTEM_CURRENCY_PARTS 1000000ull // 10^SYSTEM_CURRENCY_PRECISION
@@ -7,7 +7,7 @@
SETUP_LOG (Application)
// VFALCO: TODO, fix/clean this, it might have broken with the Log changes
// VFALCO TODO fix/clean this, it might have broken with the Log changes
LogPartition AutoSocketPartition("AutoSocket");
Application* theApp = NULL;
@@ -21,7 +21,7 @@ Application::Application ()
, mSLECache ("LedgerEntryCache", 4096, 120)
, mSNTPClient (mAuxService)
, mJobQueue (mIOService)
// VFALCO: New stuff
// VFALCO New stuff
, mFeatures (IFeatures::New (2 * 7 * 24 * 60 * 60, 200)) // two weeks, 200/256
, mFeeVote (IFeeVote::New (10, 50 * SYSTEM_CURRENCY_PARTS, 12.5 * SYSTEM_CURRENCY_PARTS))
, mFeeTrack (ILoadFeeTrack::New ())
@@ -30,12 +30,12 @@ Application::Application ()
, mUNL (IUniqueNodeList::New (mIOService))
, mProofOfWorkFactory (IProofOfWorkFactory::New ())
, mPeers (IPeers::New (mIOService))
// VFALCO: End new stuff
// VFALCO: TODO replace all NULL with nullptr
// VFALCO End new stuff
// VFALCO TODO replace all NULL with nullptr
, mRpcDB (NULL)
, mTxnDB (NULL)
, mLedgerDB (NULL)
, mWalletDB (NULL) // VFALCO: NOTE, are all these 'NULL' ctor params necessary?
, mWalletDB (NULL) // VFALCO NOTE are all these 'NULL' ctor params necessary?
, mNetNodeDB (NULL)
, mPathFindDB (NULL)
, mHashNodeDB (NULL)
@@ -47,7 +47,7 @@ Application::Application ()
, mSweepTimer (mAuxService)
, mShutdown (false)
{
// VFALCO: TODO, remove these once the call is thread safe.
// VFALCO TODO remove these once the call is thread safe.
HashMaps::getInstance ().initializeNonce <size_t> ();
}
@@ -93,7 +93,7 @@ void sigIntHandler(int)
}
#endif
// VFALCO: TODO, Figure this out it looks like the wrong tool
// VFALCO TODO Figure this out it looks like the wrong tool
static void runAux(boost::asio::io_service& svc)
{
setCallingThreadName("aux");
@@ -389,8 +389,8 @@ void Application::sweep()
theApp->stop();
}
// VFALCO: NOTE, Does the order of calls matter?
// VFALCO: TODO, fix the dependency inversion using an observer,
// VFALCO NOTE Does the order of calls matter?
// VFALCO TODO fix the dependency inversion using an observer,
// have listeners register for "onSweep ()" notification.
//
mMasterTransaction.sweep();
@@ -400,10 +400,10 @@ void Application::sweep()
mValidations->sweep();
getMasterLedgerAcquire().sweep();
mSLECache.sweep();
AcceptedLedger::sweep(); // VFALCO: NOTE, AcceptedLedger is/has a singleton?
SHAMap::sweep(); // VFALCO: NOTE, SHAMap is/has a singleton?
AcceptedLedger::sweep(); // VFALCO NOTE AcceptedLedger is/has a singleton?
SHAMap::sweep(); // VFALCO NOTE SHAMap is/has a singleton?
mNetOps.sweepFetchPack();
// VFALCO: NOTE, does the call to sweep() happen on another thread?
// VFALCO NOTE does the call to sweep() happen on another thread?
mSweepTimer.expires_from_now(boost::posix_time::seconds(theConfig.getSize(siSweepInterval)));
mSweepTimer.async_wait(boost::bind(&Application::sweep, this));
}

View File

@@ -21,7 +21,7 @@
#include "ripple_DatabaseCon.h"
// VFALCO: TODO, Fix forward declares required for header dependency loops
// VFALCO TODO Fix forward declares required for header dependency loops
class IFeatures;
class IFeeVote;
class IHashRouter;
@@ -71,8 +71,8 @@ public:
IProofOfWorkFactory& getProofOfWorkFactory() { return *mProofOfWorkFactory; }
IPeers& getPeers () { return *mPeers; }
// VFALCO: TODO, Move these to the .cpp
bool running() { return mTxnDB != NULL; } // VFALCO: TODO, replace with nullptr when beast is available
// VFALCO TODO Move these to the .cpp
bool running() { return mTxnDB != NULL; } // VFALCO TODO replace with nullptr when beast is available
bool getSystemTimeOffset(int& offset) { return mSNTPClient.getOffset(offset); }
DatabaseCon* getRpcDB() { return mRpcDB; }
@@ -118,7 +118,7 @@ private:
TXQueue mTxnQueue;
OrderBookDB mOrderBookDB;
// VFALCO: Clean stuff
// VFALCO Clean stuff
beast::ScopedPointer <IFeatures> mFeatures;
beast::ScopedPointer <IFeeVote> mFeeVote;
beast::ScopedPointer <ILoadFeeTrack> mFeeTrack;
@@ -127,7 +127,7 @@ private:
beast::ScopedPointer <IUniqueNodeList> mUNL;
beast::ScopedPointer <IProofOfWorkFactory> mProofOfWorkFactory;
beast::ScopedPointer <IPeers> mPeers;
// VFALCO: End Clean stuff
// VFALCO End Clean stuff
DatabaseCon *mRpcDB, *mTxnDB, *mLedgerDB, *mWalletDB, *mNetNodeDB, *mPathFindDB, *mHashNodeDB;

View File

@@ -17,7 +17,7 @@ private:
TER applyFeature();
TER applyFee();
// VFALCO: TODO, Can this be removed?
// VFALCO TODO Can this be removed?
bool mustHaveValidAccount() { return false; }
};

View File

@@ -1,7 +1,7 @@
#ifndef RIPPLE_LEDGER_H
#define RIPPLE_LEDGER_H
// VFALCO: TODO Get this include out of here!
// VFALCO TODO Get this include out of here!
#include "ripple_HashedObject.h"
@@ -37,14 +37,14 @@ DEFINE_INSTANCE(Ledger);
class SqliteStatement;
// VFALCO: TODO, figure out exactly how this thing works.
// VFALCO TODO figure out exactly how this thing works.
// It seems like some ledger database is stored as a global, static in the
// class. But then what is the meaning of a Ledger object? Is this
// really two classes in one? StoreOfAllLedgers + SingleLedgerObject?
//
class Ledger : public boost::enable_shared_from_this<Ledger>, public IS_INSTANCE(Ledger)
{ // The basic Ledger structure, can be opened, closed, or synching
// VFALCO: TODO, eliminate the need for friends
// VFALCO TODO eliminate the need for friends
friend class TransactionEngine;
friend class Transactor;
public:
@@ -357,7 +357,7 @@ private:
mutable boost::recursive_mutex mLock;
// VFALCO: TODO, derive this from beast::Uncopyable
// VFALCO TODO derive this from beast::Uncopyable
Ledger(const Ledger&); // no implementation
Ledger& operator=(const Ledger&); // no implementation
};

View File

@@ -13,7 +13,7 @@ SETUP_LOG (LedgerConsensus)
DECLARE_INSTANCE(LedgerConsensus);
// VFALCO: TODO, move LCTransaction to its own file and rename to ConsensusTransactor
// VFALCO TODO move LCTransaction to its own file and rename to ConsensusTransactor
//
void LCTransaction::setVote(const uint160& peer, bool votesYes)
{ // Track a peer's yes/no vote on a particular disputed transaction
@@ -561,7 +561,7 @@ void LedgerConsensus::stateAccepted()
endConsensus();
}
// VFALCO: TODO implement shutdown without a naked global
// VFALCO TODO implement shutdown without a naked global
extern volatile bool doShutdown;
void LedgerConsensus::timerEntry()
@@ -1023,7 +1023,7 @@ void LedgerConsensus::playbackProposals()
}
}
// VFALCO: TODO, clean these macros up and put them somewhere. Try to eliminate them if possible.
// VFALCO TODO clean these macros up and put them somewhere. Try to eliminate them if possible.
#define LCAT_SUCCESS 0
#define LCAT_FAIL 1
#define LCAT_RETRY 2
@@ -1042,7 +1042,7 @@ int LedgerConsensus::applyTransaction(TransactionEngine& engine, SerializedTrans
<< (retryAssured ? "/retry" : "/final");
WriteLog (lsTRACE, LedgerConsensus) << txn->getJson(0);
// VFALCO: TODO, figure out what this "trust network" is all about and why it needs exceptions.
// VFALCO TODO figure out what this "trust network" is all about and why it needs exceptions.
#ifndef TRUST_NETWORK
try
{

View File

@@ -1,5 +1,5 @@
// VFALCO: Should rename ContinuousLedgerTiming to LedgerTiming
// VFALCO Should rename ContinuousLedgerTiming to LedgerTiming
struct LedgerTimingLog;
SETUP_LOG (LedgerTimingLog)

View File

@@ -194,7 +194,7 @@ void LoadManager::threadEntry()
{
setCallingThreadName ("loadmgr");
// VFALCO: TODO replace this with a beast Time object
// VFALCO TODO replace this with a beast Time object
boost::posix_time::ptime t = boost::posix_time::microsec_clock::universal_time();
while (1)
{
@@ -221,7 +221,7 @@ void LoadManager::threadEntry()
}
// VFALCO: TODO Eliminate the dependence on the Application object by
// VFALCO TODO Eliminate the dependence on the Application object by
// constructing with the job queue and the fee tracker.
bool change;
if (theApp->getJobQueue().isOverloaded())
@@ -236,7 +236,7 @@ void LoadManager::threadEntry()
if (change)
{
// VFALCO: TODO replace this with a Listener / observer and subscribe in NetworkOPs or Application
// VFALCO TODO replace this with a Listener / observer and subscribe in NetworkOPs or Application
theApp->getOPs().reportFeeChange();
}

View File

@@ -5,7 +5,7 @@
#include <boost/thread/mutex.hpp>
// VFALCO: TODO replace LT_ with loadType in constants
// VFALCO TODO replace LT_ with loadType in constants
enum LoadType
{ // types of load that can be placed on the server
@@ -49,7 +49,7 @@ public:
class LoadSource
{
private:
// VFALCO: Make this not a friend
// VFALCO Make this not a friend
friend class LoadManager;
public:

View File

@@ -24,7 +24,7 @@ class PFRequest;
DEFINE_INSTANCE(InfoSub);
// VFALCO: TODO Move InfoSub to a separate file
// VFALCO TODO Move InfoSub to a separate file
class InfoSub : public IS_INSTANCE(InfoSub)
{
public:
@@ -74,7 +74,7 @@ public:
}
protected:
// VFALCO: TODO, make accessor for this member
// VFALCO TODO make accessor for this member
boost::mutex mLockInfo;
private:

View File

@@ -97,7 +97,7 @@ void initSSLContext (boost::asio::ssl::context& context,
if (!chain_file.empty())
{
// VFALCO: Replace fopen() with RAII
// VFALCO Replace fopen() with RAII
FILE *f = fopen(chain_file.c_str(), "r");
if (!f)
throw std::runtime_error("Unable to open chain file");

View File

@@ -888,7 +888,7 @@ Json::Value RPCHandler::doProofCreate(Json::Value jvRequest, int& cost, ScopedLo
if (jvRequest.isMember("difficulty") || jvRequest.isMember("secret"))
{
// VFALCO: TODO, why aren't we using the app's factory?
// VFALCO TODO why aren't we using the app's factory?
beast::ScopedPointer <IProofOfWorkFactory> pgGen (IProofOfWorkFactory::New ());
if (jvRequest.isMember("difficulty"))
@@ -973,7 +973,7 @@ Json::Value RPCHandler::doProofVerify(Json::Value jvRequest, int& cost, ScopedLo
POWResult prResult;
if (jvRequest.isMember("difficulty") || jvRequest.isMember("secret"))
{
// VFALCO: TODO, why aren't we using the app's factory?
// VFALCO TODO why aren't we using the app's factory?
beast::ScopedPointer <IProofOfWorkFactory> pgGen (IProofOfWorkFactory::New ());
if (jvRequest.isMember("difficulty"))

View File

@@ -144,7 +144,7 @@ private:
handler_t mHandler;
};
// VFALCO: TODO, tidy up this loose function
// VFALCO TODO tidy up this loose function
int iAdminGet (const Json::Value& jvRequest, const std::string& strRemoteIp);
#endif

View File

@@ -6,7 +6,7 @@
#include "LedgerEntrySet.h"
// VFALCO: TODO, move this to a separate file
// VFALCO TODO move this to a separate file
class PaymentNode
{
public:
@@ -15,7 +15,7 @@ public:
Json::Value getJson() const;
private:
// VFALCO: TODO, remove the need for friend declaration
// VFALCO TODO remove the need for friend declaration
friend class RippleCalc;
friend class PathState;

View File

@@ -1,7 +1,7 @@
#ifndef RIPPLE_SHAMAP_H
#define RIPPLE_SHAMAP_H
// VFALCO: TODO Get this include out of here!
// VFALCO TODO Get this include out of here!
#include "ripple_UptimeTimerAdapter.h"
DEFINE_INSTANCE(SHAMap);
@@ -319,7 +319,7 @@ private:
SMAddNode(bool i, bool u) : mInvalid(i), mUseful(u) { ; }
};
// VFALCO: TODO, tidy up this loose function
// VFALCO TODO tidy up this loose function
extern bool SMANCombine(SMAddNode& existing, const SMAddNode& additional);
class SHAMap : public IS_INSTANCE(SHAMap)

View File

@@ -3,7 +3,7 @@
DEFINE_INSTANCE(SerializedLedgerEntry);
// VFALCO: TODO, rename this to SerializedLedger
// VFALCO TODO rename this to SerializedLedger
class SerializedLedgerEntry : public STObject, private IS_INSTANCE(SerializedLedgerEntry)
{
public:

View File

@@ -1,7 +1,7 @@
#ifndef __SERIALIZEDTRANSACTION__
#define __SERIALIZEDTRANSACTION__
// VFALCO: TODO, eliminate these macros
// VFALCO TODO eliminate these macros
#define TXN_SQL_NEW 'N'
#define TXN_SQL_CONFLICT 'C'

View File

@@ -1,5 +1,5 @@
// VFALCO: TODO, move this into TransactionEngine.cpp
// VFALCO TODO move this into TransactionEngine.cpp
// Double check a transaction's metadata to make sure no system invariants were broken

View File

@@ -1,5 +1,5 @@
// VFALCO: TODO, rename class to TransactionMeta
// VFALCO TODO rename class to TransactionMeta
SETUP_LOG (TransactionMetaSet)

View File

@@ -1,5 +1,5 @@
//VFALCO: TODO, clean this up since it is just a file holding a single member function definition
//VFALCO TODO clean this up since it is just a file holding a single member function definition
static std::vector<std::string> getSchema(DatabaseCon* dbc, const std::string& dbName)
{

View File

@@ -12,7 +12,7 @@
namespace po = boost::program_options;
// VFALCO: TODO make these singletons that initialize statically
// VFALCO TODO make these singletons that initialize statically
extern void TFInit();
extern void LEFInit();
@@ -213,7 +213,7 @@ int main(int argc, char* argv[])
InstanceType::multiThread();
// VFALCO: TODO make these singletons that initialize statically
// VFALCO TODO make these singletons that initialize statically
TFInit();
LEFInit();

View File

@@ -2,7 +2,7 @@
// TODO: Check permissions on config file before using it.
//
// VFALCO: TODO Rename and replace these macros with variables.
// VFALCO TODO Rename and replace these macros with variables.
#define SECTION_ACCOUNT_PROBE_MAX "account_probe_max"
#define SECTION_CLUSTER_NODES "cluster_nodes"
#define SECTION_DATABASE_PATH "database_path"

View File

@@ -1,7 +1,7 @@
#ifndef RIPPLE_CONFIG_H
#define RIPPLE_CONFIG_H
// VFALCO: NOTE, Set this to 1 to enable code which is unnecessary
// VFALCO NOTE Set this to 1 to enable code which is unnecessary
#define ENABLE_INSECURE 0
#define CONFIG_FILE_NAME SYSTEM_NAME "d.cfg" // rippled.cfg
@@ -55,8 +55,8 @@ struct SizedItem
int sizes[5];
};
// VFALCO: TODO, rename all fields to not look like macros, and be more verbose
// VFALCO: TODO, document every member
// VFALCO TODO rename all fields to not look like macros, and be more verbose
// VFALCO TODO document every member
class Config
{
public:

View File

@@ -5,7 +5,7 @@ DatabaseCon::DatabaseCon(const std::string& strName, const char *initStrings[],
{
++sCount;
// VFALCO: TODO, remove this dependency on the config by making it the caller's
// VFALCO TODO remove this dependency on the config by making it the caller's
// responsibility to pass in the path. Add a member function to Application
// or Config to compute this path.
//

View File

@@ -1,7 +1,7 @@
#ifndef RIPPLE_DATABASECON_H
#define RIPPLE_DATABASECON_H
// VFALCO: NOTE This looks like a pointless class. Figure out
// VFALCO NOTE This looks like a pointless class. Figure out
// what purpose it is really trying to serve and do it better.
class DatabaseCon
{
@@ -12,10 +12,10 @@ public:
boost::recursive_mutex& getDBLock() { return mLock; }
static int getCount() { return sCount; }
// VFALCO: TODO, change "protected" to "private" throughout the code
// VFALCO TODO change "protected" to "private" throughout the code
private:
Database* mDatabase;
// VFALCO: TODO replace these with a single atomic counter.
// VFALCO TODO replace these with a single atomic counter.
boost::recursive_mutex mLock;
static int sCount;
};

View File

@@ -5,7 +5,7 @@ SETUP_LOG (Features)
FeatureState* testFeature = NULL;
// VFALCO: TODO Rename this to Features
// VFALCO TODO Rename this to Features
class Features : public IFeatures
{
protected:

View File

@@ -6,7 +6,7 @@ class Features;
class FeeVote : public IFeeVote
{
private:
// VFALCO: TODO, rename template parameter (wtf, looks like a macro)
// VFALCO TODO rename template parameter (wtf, looks like a macro)
template <typename INT>
class VotableInteger
{

View File

@@ -1,7 +1,7 @@
DECLARE_INSTANCE(HashRouterEntry);
// VFALCO: TODO Inline the function definitions
// VFALCO TODO Inline the function definitions
class HashRouter : public IHashRouter
{
public:

View File

@@ -25,7 +25,7 @@ DEFINE_INSTANCE (HashedObject);
@note No checking is performed to make sure the hash matches the data.
@see SHAMap
*/
// VFALCO: TODO, consider making the instance a private member of SHAMap
// VFALCO TODO consider making the instance a private member of SHAMap
// since its the primary user.
//
class HashedObject : private IS_INSTANCE (HashedObject)
@@ -81,7 +81,7 @@ public:
/** Retrieve the ledger index in which this object appears.
*/
// VFALCO: TODO rename to getLedgerIndex or getLedgerId
// VFALCO TODO rename to getLedgerIndex or getLedgerId
uint32 getIndex () const
{
return mLedgerIndex;

View File

@@ -69,7 +69,7 @@ public:
virtual void setEnabledFeatures(const std::vector<uint256>& features) = 0;
virtual void setSupportedFeatures(const std::vector<uint256>& features) = 0;
// VFALCO: NOTE these can't possibly be used since featureList_t was/is private.
// VFALCO NOTE these can't possibly be used since featureList_t was/is private.
/*
featureList_t getVetoedFeatures() = 0;
featureList_t getEnabledFeatures() = 0;

View File

@@ -3,7 +3,7 @@
DEFINE_INSTANCE (HashRouterEntry);
// VFALCO: TODO, convert these macros to int constants
// VFALCO TODO convert these macros to int constants
#define SF_RELAYED 0x01 // Has already been relayed to other nodes
#define SF_BAD 0x02 // Signature/format is bad
#define SF_SIGGOOD 0x04 // Signature is good
@@ -11,7 +11,7 @@ DEFINE_INSTANCE (HashRouterEntry);
#define SF_RETRY 0x10 // Transaction can be retried
#define SF_TRUSTED 0x20 // comes from trusted source
// VFALCO: TODO move this class into the scope of class HashRouter
// VFALCO TODO move this class into the scope of class HashRouter
class HashRouterEntry : private IS_INSTANCE (HashRouterEntry)
{
public:
@@ -35,7 +35,7 @@ protected:
class IHashRouter
{
public:
// VFALCO: NOTE, this preferred alternative to default parameters makes
// VFALCO NOTE this preferred alternative to default parameters makes
// behavior clear.
//
static inline int getDefaultHoldTime ()
@@ -43,7 +43,7 @@ public:
return 120;
}
// VFALCO: TODO rename the parameter to entryHoldTimeInSeconds
// VFALCO TODO rename the parameter to entryHoldTimeInSeconds
static IHashRouter* New (int holdTime);
virtual ~IHashRouter () { }

View File

@@ -62,13 +62,13 @@ public:
// Connection policy
//
virtual void policyLowWater() = 0;
virtual void policyEnforce() = 0; // VFALCO: This and others can be made private
virtual void policyEnforce() = 0; // VFALCO This and others can be made private
// configured connections
virtual void makeConfigured() = 0;
};
// VFALCO: TODO Put this in some group of utilities
// VFALCO TODO Put this in some group of utilities
extern void splitIpPort(const std::string& strIpPort, std::string& strIp, int& iPort);
#endif

View File

@@ -11,7 +11,7 @@ enum POWResult
powTOOEASY = 5, // the difficulty increased too much while you solved it
};
// VFALCO: TODO move this to the class as a static member and rename it
// 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
@@ -25,7 +25,7 @@ public:
virtual ~IProofOfWorkFactory () { }
// VFALCO: TODO which members can be const?
// VFALCO TODO which members can be const?
virtual ProofOfWork getProof () = 0;

View File

@@ -14,19 +14,19 @@ public:
vsWeb = 'W',
} validatorSource;
// VFALCO: TODO, rename this to use the right coding style
// VFALCO TODO rename this to use the right coding style
typedef long score;
public:
// VFALCO: TODO, make this not use boost::asio...
// VFALCO TODO make this not use boost::asio...
static IUniqueNodeList* New (boost::asio::io_service& io_service);
virtual ~IUniqueNodeList () { }
// VFALCO: TODO, Roll this into the constructor so there is one less state.
// VFALCO TODO Roll this into the constructor so there is one less state.
virtual void start () = 0;
// VFALCO: TODO, rename all these, the "node" prefix is redundant (lol)
// VFALCO TODO rename all these, the "node" prefix is redundant (lol)
virtual void nodeAddPublic (const RippleAddress& naNodePublic, validatorSource vsWhy, const std::string& strComment) = 0;
virtual void nodeAddDomain(std::string strDomain, validatorSource vsWhy, const std::string& strComment="") = 0;
virtual void nodeRemovePublic(const RippleAddress& naNodePublic) = 0;

View File

@@ -1,7 +1,7 @@
#ifndef RIPPLE_IVALIDATIONS_H
#define RIPPLE_IVALIDATIONS_H
// VFALCO: TODO rename and move these typedefs into the IValidations interface
// VFALCO TODO rename and move these typedefs into the IValidations interface
typedef boost::unordered_map<uint160, SerializedValidation::pointer> ValidationSet;
typedef std::pair<int, uint160> currentValidationCount; // nodes validating and highest node ID validating
@@ -24,7 +24,7 @@ public:
virtual int getNodesAfter (const uint256& ledger) = 0;
virtual int getLoadRatio (bool overLoaded) = 0;
// VFALCO: TODO, make a typedef for this ugly return value!
// VFALCO TODO make a typedef for this ugly return value!
virtual boost::unordered_map<uint256, currentValidationCount> getCurrentValidations (
uint256 currentLedger, uint256 previousLedger) = 0;

View File

@@ -21,7 +21,7 @@ Job::Job (JobType type,
, mJob (job)
, mName (name)
{
// VFALCO: NOTE, what the heck does this do?
// VFALCO NOTE what the heck does this do?
mLoadMonitor = boost::make_shared <LoadEvent> (boost::ref (lm), name, false);
}

View File

@@ -36,19 +36,19 @@ enum JobType
jtHO_WRITE = 31,
}; // CAUTION: If you add new types, add them to JobType.cpp too
// VFALCO: TODO, move this into the enum so it calculates itself?
// VFALCO TODO move this into the enum so it calculates itself?
#define NUM_JOB_TYPES 48 // why 48 and not 32?
class Job
{
public:
// VFALCO: TODO, find out why these extra constructors are needed
// VFALCO TODO find out why these extra constructors are needed
Job();
Job (JobType type, uint64 index);
// VFALCO: TODO, try to remove the dependency on LoadMonitor.
// VFALCO TODO try to remove the dependency on LoadMonitor.
Job (JobType type,
std::string const& name,
uint64 index,
@@ -73,7 +73,7 @@ private:
JobType mType;
uint64 mJobIndex;
FUNCTION_TYPE <void (Job&)> mJob;
// VFALCO: TODO, why is this called mLoadMonitor if the type is LoadEvent pointer?
// VFALCO TODO why is this called mLoadMonitor if the type is LoadEvent pointer?
LoadEvent::pointer mLoadMonitor;
std::string mName;
};

View File

@@ -216,7 +216,7 @@ void JobQueue::IOThread(boost::mutex::scoped_lock& sl)
void JobQueue::threadEntry()
{
// VFALCO: TODO, Replace this mutex nonsense
// VFALCO TODO Replace this mutex nonsense
//
boost::mutex::scoped_lock sl(mJobLock);
while (1)

View File

@@ -10,14 +10,14 @@ public:
typedef UPTR_T<LoadEvent> autoptr;
public:
// VFALCO: TODO, remove the dependency on LoadMonitor.
// VFALCO TODO remove the dependency on LoadMonitor.
LoadEvent (LoadMonitor& monitor,
const std::string& name,
bool shouldStart);
~LoadEvent();
// VFALCO: TODO, rename this to setName () or setLabel ()
// VFALCO TODO rename this to setName () or setLabel ()
void reName (const std::string& name);
// okay to call if already started

View File

@@ -17,7 +17,7 @@ private:
boost::mutex mLock;
// VFALCO: TODO Move this function to some "math utilities" file
// VFALCO TODO Move this function to some "math utilities" file
// compute (value)*(mul)/(div) - avoid overflow but keep precision
uint64 mulDiv (uint64 value, uint32 mul, uint64 div)
{

View File

@@ -11,7 +11,7 @@ LoadMonitor::LoadMonitor ()
{
}
// VFALCO: NOTE WHY do we need "the mutex?" This dependence on
// VFALCO NOTE WHY do we need "the mutex?" This dependence on
// a hidden global, especially a synchronization primitive,
// is a flawed design.
// It's not clear exactly which data needs to be protected.
@@ -21,7 +21,7 @@ void LoadMonitor::update ()
{
int now = UptimeTimer::getInstance().getElapsedSeconds ();
// VFALCO: TODO stop returning from the middle of functions.
// VFALCO TODO stop returning from the middle of functions.
if (now == mLastUpdate) // current
return;
@@ -34,7 +34,7 @@ void LoadMonitor::update ()
mLatencyMSAvg = 0;
mLatencyMSPeak = 0;
mLastUpdate = now;
// VFALCO: TODO, don't return from the middle...
// VFALCO TODO don't return from the middle...
return;
}

View File

@@ -18,7 +18,7 @@ public:
bool isOverTarget(uint64 avg, uint64 peak);
// VFALCO: TODO, make this return the values in a struct.
// VFALCO TODO make this return the values in a struct.
void getCountAndLatency (uint64& count, uint64& latencyAvg, uint64& latencyPeak, bool& isOver);
bool isOver ();

View File

@@ -1,5 +1,5 @@
// VFALCO: NOTE, this looks like some facility for giving websocket
// VFALCO NOTE this looks like some facility for giving websocket
// a way to produce logging output.
//
namespace websocketpp

View File

@@ -1,4 +1,4 @@
// VFALCO: TODO, make this an inline function
// VFALCO TODO make this an inline function
#define ADDRESS(p) strHex(uint64( ((char*) p) - ((char*) 0)))
SETUP_LOG (Peer)
@@ -44,7 +44,7 @@ public:
void connected(const boost::system::error_code& error);
void detach(const char *, bool onIOStrand);
// VFALCO: Seems no one is using these
// VFALCO Seems no one is using these
//bool samePeer (Peer::ref p) { return samePeer(*p); }
//bool samePeer (const Peer& p) { return this == &p; }
@@ -148,7 +148,7 @@ private:
void doFetchPack(const boost::shared_ptr<ripple::TMGetObjectByHash>& packet);
// VFALCO: NOTE, why is this a static member instead of a regular member?
// VFALCO NOTE why is this a static member instead of a regular member?
static void doProofOfWork (Job&, boost::weak_ptr <Peer>, ProofOfWork::pointer);
};

View File

@@ -23,7 +23,7 @@ public:
uint64 id,
bool inbound);
// VFALCO: TODO see if this and below can be private
// VFALCO TODO see if this and below can be private
virtual void handleConnect (const boost::system::error_code& error,
boost::asio::ip::tcp::resolver::iterator it) = 0;
@@ -52,7 +52,7 @@ public:
virtual void punishPeer (LoadType) = 0;
// VFALCO: NOTE, what's with this odd parameter passing? Why the static member?
// VFALCO NOTE what's with this odd parameter passing? Why the static member?
static void punishPeer (const boost::weak_ptr<Peer>&, LoadType);
virtual Json::Value getJson () = 0;

View File

@@ -1,5 +1,5 @@
// VFALCO: TODO, make this an inline function
// VFALCO TODO make this an inline function
#define ADDRESS_SHARED(p) strHex(uint64( ((char*) (p).get()) - ((char*) 0)))
// How often to enforce policies.

View File

@@ -15,7 +15,7 @@
// Don't bother propagating past this number of rounds.
#define SCORE_ROUNDS 10
// VFALCO: TODO, move all function definitions inlined into the class.
// VFALCO TODO move all function definitions inlined into the class.
class UniqueNodeList : public IUniqueNodeList
{
private:
@@ -140,7 +140,7 @@ public:
int iSourceScore(validatorSource vsWhy);
};
// VFALCO: TODO Replace macros with language constructs
// VFALCO TODO Replace macros with language constructs
#define VALIDATORS_FETCH_SECONDS 30
#define VALIDATORS_FILE_BYTES_MAX (50 << 10)

View File

@@ -25,7 +25,7 @@ unsigned int const gMaxHTTPHeaderSize = 0x02000000;
std::string gFormatStr("v1");
// VFALCO: TODO, clean up this nonsense
// VFALCO TODO clean up this nonsense
std::string FormatFullVersion()
{
return(gFormatStr);

View File

@@ -2,7 +2,7 @@
// Unity build file for websocket
//
// VFALCO: TODO: Fix this right. It's not really needed
// VFALCO TODO Fix this right. It's not really needed
// to include this file, its a hack to keep
// __STDC_LIMIT_MACROS from generating redefinition warnings
#include "websocketpp/src/rng/boost_rng.hpp"