mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-27 06:25:51 +00:00
Reformat annotations in preparation for automated extraction
This commit is contained in:
@@ -82,7 +82,7 @@ else:
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
#
|
||||
# VFALCO: This is my oasis of sanity. Nothing having to do with directories,
|
||||
# VFALCO This is my oasis of sanity. Nothing having to do with directories,
|
||||
# source files, or include paths should reside outside the boundaries.
|
||||
#
|
||||
|
||||
|
||||
@@ -68,9 +68,9 @@ namespace boost
|
||||
};
|
||||
}
|
||||
|
||||
// VFALCO: Maybe not the best place for this but it sort of makes sense here
|
||||
// VFALCO Maybe not the best place for this but it sort of makes sense here
|
||||
|
||||
// VFALCO: NOTE, these three are unused.
|
||||
// VFALCO NOTE these three are unused.
|
||||
/*
|
||||
template<typename T> T range_check(const T& value, const T& minimum, const T& maximum)
|
||||
{
|
||||
@@ -94,7 +94,7 @@ template<typename T> T range_check_max(const T& value, const T& maximum)
|
||||
}
|
||||
*/
|
||||
|
||||
// VFALCO: TODO, these parameters should not be const references.
|
||||
// VFALCO TODO these parameters should not be const references.
|
||||
template<typename T, typename U> T range_check_cast(const U& value, const T& minimum, const T& maximum)
|
||||
{
|
||||
if ((value < minimum) || (value > maximum))
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
#include <boost/asio.hpp> // for stupid parseIpPort
|
||||
#include <boost/regex.hpp>
|
||||
|
||||
// VFALCO: TODO, Replace OpenSSL randomness with a dependency-free implementation
|
||||
// VFALCO TODO Replace OpenSSL randomness with a dependency-free implementation
|
||||
// Perhaps Schneier's Fortuna or a variant. Abstract the collection of
|
||||
// entropy and provide OS-specific implementation. We can re-use the
|
||||
// BearShare source code for this.
|
||||
@@ -56,7 +56,7 @@
|
||||
|
||||
|
||||
|
||||
// VFALCO: TODO, fix these warnings!
|
||||
// VFALCO TODO fix these warnings!
|
||||
#ifdef _MSC_VER
|
||||
//#pragma warning (push) // Causes spurious C4503 "decorated name exceeds maximum length"
|
||||
//#pragma warning (disable: 4018) // signed/unsigned mismatch
|
||||
|
||||
@@ -62,7 +62,7 @@ namespace boost {
|
||||
}
|
||||
}
|
||||
*/
|
||||
#include <boost/filesystem.hpp> // VFALCO: TODO, try to eliminate thie dependency
|
||||
#include <boost/filesystem.hpp> // VFALCO TODO try to eliminate thie dependency
|
||||
|
||||
|
||||
|
||||
@@ -117,7 +117,7 @@ namespace boost {
|
||||
#include <boost/bind.hpp>
|
||||
#include <boost/function.hpp>
|
||||
|
||||
// VFALCO: TODO, remove this dependency!!!
|
||||
// VFALCO TODO remove this dependency!!!
|
||||
#include <openssl/dh.h> // for DiffieHellmanUtil
|
||||
#include <openssl/ripemd.h> // For HashUtilities
|
||||
#include <openssl/sha.h> // For HashUtilities
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
done by seeding the hashing function with a random number generated
|
||||
at program startup.
|
||||
*/
|
||||
// VFALCO: TODO derive from Uncopyable
|
||||
// VFALCO TODO derive from Uncopyable
|
||||
class HashMaps // : beast::Uncopayble
|
||||
{
|
||||
public:
|
||||
@@ -88,7 +88,7 @@ private:
|
||||
public:
|
||||
NonceHolder ()
|
||||
{
|
||||
// VFALCO: NOTE, this can be dangerous if T is an object type
|
||||
// VFALCO NOTE this can be dangerous if T is an object type
|
||||
RandomNumbers::getInstance ().fill (&m_nonce);
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
// Reference: http://www.mail-archive.com/licq-commits@googlegroups.com/msg02334.html
|
||||
|
||||
// VFALCO: TODO, use VFLIB_* platform macros instead of hard-coded compiler specific ones
|
||||
// VFALCO TODO use VFLIB_* platform macros instead of hard-coded compiler specific ones
|
||||
#ifdef WIN32
|
||||
extern uint64_t htobe64(uint64_t value);
|
||||
extern uint64_t be64toh(uint64_t value);
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
#ifndef RIPPLE_HASHUTILITIES_H
|
||||
#define RIPPLE_HASHUTILITIES_H
|
||||
|
||||
// VFALCO: NOTE, these came from BitcoinUtil.h
|
||||
// VFALCO NOTE these came from BitcoinUtil.h
|
||||
|
||||
// VFALCO: TODO, Rewrite the callers so we don't need templates,
|
||||
// VFALCO TODO Rewrite the callers so we don't need templates,
|
||||
// then define these in a .cpp so they are no longer inline.
|
||||
//
|
||||
template<typename T1>
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
#ifndef RIPPLE_INSTANCECOUNTER_H
|
||||
#define RIPPLE_INSTANCECOUNTER_H
|
||||
|
||||
// VFALCO: TODO Clean up this junk, remove the macros, replace
|
||||
// VFALCO TODO Clean up this junk, remove the macros, replace
|
||||
// with a robust leak checker when we have atomics.
|
||||
//
|
||||
|
||||
// VFALCO: TODO, swap these. Declaration means header, definition means .cpp!!!
|
||||
// VFALCO TODO swap these. Declaration means header, definition means .cpp!!!
|
||||
#define DEFINE_INSTANCE(x) \
|
||||
extern InstanceType IT_##x; \
|
||||
class Instance_##x : private Instance \
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
#define IS_INSTANCE(x) Instance_##x
|
||||
|
||||
// VFALCO: NOTE, that this is just a glorified leak checker with an awkward API
|
||||
// VFALCO NOTE that this is just a glorified leak checker with an awkward API
|
||||
class InstanceType
|
||||
{
|
||||
protected:
|
||||
@@ -65,7 +65,7 @@ public:
|
||||
{
|
||||
if (sMultiThreaded)
|
||||
{
|
||||
// VFALCO: NOTE, Junk that will go away with atomics
|
||||
// VFALCO NOTE Junk that will go away with atomics
|
||||
mLock.lock();
|
||||
++mInstances;
|
||||
mLock.unlock();
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef INTEGERTYPES_H
|
||||
#define INTEGERTYPES_H
|
||||
|
||||
// VFALCO: TODO, determine if Borland C is supported
|
||||
// VFALCO TODO determine if Borland C is supported
|
||||
#if defined (_MSC_VER) /*|| defined(__BORLANDC__)*/
|
||||
typedef __int64 int64;
|
||||
typedef unsigned __int64 uint64;
|
||||
@@ -18,7 +18,7 @@ typedef int int32;
|
||||
|
||||
#endif
|
||||
|
||||
// VFALCO: TODO, make sure minimum VS version is 9, 10, or 11
|
||||
// VFALCO TODO make sure minimum VS version is 9, 10, or 11
|
||||
// If commenting this out creates a problem, contact me!
|
||||
/*
|
||||
#if defined(_MSC_VER) && _MSC_VER < 1300
|
||||
|
||||
@@ -37,7 +37,7 @@ std::vector< std::pair<std::string, std::string> > LogPartition::getSeverities()
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
// VFALCO: TODO, remove original code once we know the replacement is correct.
|
||||
// VFALCO TODO remove original code once we know the replacement is correct.
|
||||
// Original code
|
||||
/*
|
||||
std::string ls = oss.str();
|
||||
|
||||
@@ -14,7 +14,7 @@ enum LogSeverity
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
// VFALCO: TODO, make this a nested class in Log
|
||||
// VFALCO TODO make this a nested class in Log
|
||||
class LogPartition
|
||||
{
|
||||
protected:
|
||||
@@ -100,11 +100,11 @@ public:
|
||||
static std::string rotateLog ();
|
||||
|
||||
private:
|
||||
// VFALCO: TODO, derive from beast::Uncopyable
|
||||
// VFALCO TODO derive from beast::Uncopyable
|
||||
Log (const Log&); // no implementation
|
||||
Log& operator= (const Log&); // no implementation
|
||||
|
||||
// VFALCO: TODO, looks like there are really TWO classes in here.
|
||||
// VFALCO TODO looks like there are really TWO classes in here.
|
||||
// One is a stream target for '<<' operator and the other
|
||||
// is a singleton. Split the singleton out to a new class.
|
||||
//
|
||||
|
||||
@@ -19,11 +19,11 @@
|
||||
#ifndef RIPPLE_PLATFORMMACROS_H
|
||||
#define RIPPLE_PLATFORMMACROS_H
|
||||
|
||||
// VFALCO: TODO Clean this up
|
||||
// VFALCO TODO Clean this up
|
||||
|
||||
#if (!defined(FORCE_NO_C11X) && (__cplusplus > 201100L)) || defined(FORCE_C11X)
|
||||
|
||||
// VFALCO: TODO, replace BIND_TYPE with a namespace lift
|
||||
// VFALCO TODO replace BIND_TYPE with a namespace lift
|
||||
|
||||
#define C11X
|
||||
#include <functional>
|
||||
@@ -49,7 +49,7 @@
|
||||
|
||||
#endif
|
||||
|
||||
// VFALCO: TODO, Clean this junk up
|
||||
// VFALCO TODO Clean this junk up
|
||||
#define nothing() do {} while (0)
|
||||
#define fallthru() do {} while (0)
|
||||
#define NUMBER(x) (sizeof(x)/sizeof((x)[0]))
|
||||
|
||||
@@ -39,11 +39,11 @@ bool RandomNumbers::initialize ()
|
||||
|
||||
void RandomNumbers::fillBytes (void* destinationBuffer, int numberOfBytes)
|
||||
{
|
||||
// VFALCO: NOTE this assert is here to remind us that the code is not yet
|
||||
// VFALCO NOTE this assert is here to remind us that the code is not yet
|
||||
// thread safe.
|
||||
assert (m_initialized);
|
||||
|
||||
// VFALCO: NOTE When a spinlock is available in beast, use it here.
|
||||
// VFALCO NOTE When a spinlock is available in beast, use it here.
|
||||
if (! m_initialized)
|
||||
{
|
||||
if (! initialize ())
|
||||
@@ -75,7 +75,7 @@ RandomNumbers& RandomNumbers::getInstance ()
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
// VFALCO: TODO replace WIN32 macro
|
||||
// VFALCO TODO replace WIN32 macro
|
||||
|
||||
#ifdef WIN32
|
||||
|
||||
@@ -160,7 +160,7 @@ bool RandomNumbers::platformAddEntropy ()
|
||||
|
||||
void RandomNumbers::platformAddPerformanceMonitorEntropy ()
|
||||
{
|
||||
// VFALCO: This is how we simulate local functions
|
||||
// VFALCO This is how we simulate local functions
|
||||
struct
|
||||
{
|
||||
int64 operator() () const
|
||||
@@ -175,7 +175,7 @@ void RandomNumbers::platformAddPerformanceMonitorEntropy ()
|
||||
{
|
||||
struct
|
||||
{
|
||||
// VFALCO: TODO, clean this up
|
||||
// VFALCO TODO clean this up
|
||||
int64 operator() () const
|
||||
{
|
||||
int64 nCounter = 0;
|
||||
|
||||
@@ -6,7 +6,7 @@ typedef boost::recursive_mutex::scoped_lock ScopedLock;
|
||||
// A lock holder that can be returned and copied by value
|
||||
// When the last reference goes away, the lock is released
|
||||
|
||||
// VFALCO: TODO, replace these with a more generic template, and not use boost
|
||||
// VFALCO TODO replace these with a more generic template, and not use boost
|
||||
//
|
||||
class SharedScopedLock
|
||||
{
|
||||
@@ -30,7 +30,7 @@ protected:
|
||||
boost::recursive_mutex& mMutex;
|
||||
|
||||
public:
|
||||
// VFALCO: TODO, get rid of this unlock parameter to restore sanity
|
||||
// VFALCO TODO get rid of this unlock parameter to restore sanity
|
||||
ScopedUnlock(boost::recursive_mutex& mutex, bool unlock = true) : mUnlocked(unlock), mMutex(mutex)
|
||||
{
|
||||
if (unlock)
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#ifndef RIPPLE_SUSTAIN_H
|
||||
#define RIPPLE_SUSTAIN_H
|
||||
|
||||
// VFALCO: TODO, figure out what the heck this is??
|
||||
// VFALCO TODO figure out what the heck this is??
|
||||
extern bool HaveSustain();
|
||||
extern std::string StopSustain();
|
||||
extern std::string DoSustain();
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
// VFALCO: TODO, use VFLIB_MSVC macro instead
|
||||
// VFALCO TODO use VFLIB_MSVC macro instead
|
||||
#if _MSC_VER
|
||||
|
||||
void setCallingThreadName (char const* threadName)
|
||||
|
||||
@@ -38,7 +38,7 @@ int UptimeTimer::getElapsedSeconds () const
|
||||
}
|
||||
else
|
||||
{
|
||||
// VFALCO: TODO, use time_t instead of int return
|
||||
// VFALCO TODO use time_t instead of int return
|
||||
result = static_cast <int> (::time (0) - m_startTime);
|
||||
}
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
The timer can be switched to a manual system of updating, to reduce
|
||||
system calls. (?)
|
||||
*/
|
||||
// VFALCO: TODO, determine if the non-manual timing is actually needed
|
||||
// VFALCO TODO determine if the non-manual timing is actually needed
|
||||
class UptimeTimer
|
||||
{
|
||||
private:
|
||||
@@ -42,7 +42,7 @@ public:
|
||||
static UptimeTimer& getInstance ();
|
||||
|
||||
private:
|
||||
// VFALCO: DEPRECATED, Use a memory barrier instead of forcing a cache line
|
||||
// VFALCO DEPRECATED, Use a memory barrier instead of forcing a cache line
|
||||
int m_pad1; // make sure m_elapsedTime fits in its own cache line
|
||||
int volatile m_elapsedTime;
|
||||
int m_pad2;
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
class Base58
|
||||
{
|
||||
public:
|
||||
// VFALCO: TODO, clean up this poor API
|
||||
// VFALCO TODO clean up this poor API
|
||||
static char const* getCurrentAlphabet ();
|
||||
static void setCurrentAlphabet (char const* alphabet);
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ public:
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
// VFALCO: TODO figure out a way to remove the dependency on openssl in the
|
||||
// VFALCO TODO figure out a way to remove the dependency on openssl in the
|
||||
// header. Maybe rewrite this to use cryptopp.
|
||||
|
||||
class CBigNum : public BIGNUM
|
||||
@@ -130,7 +130,7 @@ bool operator>(const CBigNum& a, const CBigNum& b);
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
// VFALCO: NOTE, this seems as good a place as any for this.
|
||||
// VFALCO NOTE this seems as good a place as any for this.
|
||||
|
||||
// Here's the old implementation using macros, in case something broke
|
||||
//#if (ULONG_MAX > UINT_MAX)
|
||||
@@ -140,7 +140,7 @@ bool operator>(const CBigNum& a, const CBigNum& b);
|
||||
//#define BN_div_word64(bn, word) BN_div_word(bn, word)
|
||||
//#endif
|
||||
|
||||
// VFALCO: I believe only STAmount uses these
|
||||
// VFALCO I believe only STAmount uses these
|
||||
extern int BN_add_word64 (BIGNUM *a, uint64 w);
|
||||
extern int BN_sub_word64 (BIGNUM *a, uint64 w);
|
||||
extern int BN_mul_word64 (BIGNUM *a, uint64 w);
|
||||
|
||||
@@ -4,4 +4,4 @@
|
||||
// file license.txt or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
|
||||
// VFALCO: TODO, move inlined stuff from CKey into here
|
||||
// VFALCO TODO move inlined stuff from CKey into here
|
||||
@@ -32,7 +32,7 @@
|
||||
// see www.keylength.com
|
||||
// script supports up to 75 for single byte push
|
||||
|
||||
// VFALCO: NOTE, this is unused
|
||||
// VFALCO NOTE this is unused
|
||||
/*
|
||||
int static inline EC_KEY_regenerate_key(EC_KEY *eckey, BIGNUM *priv_key)
|
||||
{
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// RFC 1751 code converted to C++/Boost.
|
||||
//
|
||||
|
||||
// VFALCO: TODO, move these
|
||||
// VFALCO TODO move these
|
||||
#include <boost/algorithm/string.hpp>
|
||||
#include <boost/algorithm/string/trim.hpp>
|
||||
#include <boost/algorithm/string/predicate.hpp>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef RIPPLE_FIELDNAMES_H
|
||||
#define RIPPLE_FIELDNAMES_H
|
||||
|
||||
// VFALCO: TODO, lose the macro.
|
||||
// VFALCO TODO lose the macro.
|
||||
#define FIELD_CODE(type, index) ((static_cast<int>(type) << 16) | index)
|
||||
|
||||
enum SerializedTypeID
|
||||
@@ -23,7 +23,7 @@ enum SerializedTypeID
|
||||
STI_VALIDATION = 10003,
|
||||
};
|
||||
|
||||
// VFALCO: TODO, rename this to NamedField
|
||||
// VFALCO TODO rename this to NamedField
|
||||
class SField
|
||||
{
|
||||
public:
|
||||
@@ -104,7 +104,7 @@ public:
|
||||
|
||||
static int compare(SField::ref f1, SField::ref f2);
|
||||
|
||||
// VFALCO: TODO, make these private
|
||||
// VFALCO TODO make these private
|
||||
protected:
|
||||
static std::map<int, ptr> codeToField;
|
||||
static boost::mutex mapMutex;
|
||||
|
||||
@@ -3,7 +3,7 @@ std::map <int, LedgerEntryFormat*> LedgerEntryFormat::byType;
|
||||
|
||||
std::map <std::string, LedgerEntryFormat*> LedgerEntryFormat::byName;
|
||||
|
||||
// VFALCO: TODO, surely we can think of a better way than macros?
|
||||
// VFALCO TODO surely we can think of a better way than macros?
|
||||
|
||||
#define LEF_BASE \
|
||||
<< SOElement(sfLedgerIndex, SOE_OPTIONAL) \
|
||||
|
||||
@@ -25,7 +25,7 @@ public:
|
||||
|
||||
/** Retrieve the packed message data.
|
||||
*/
|
||||
// VFALCO: TODO, shouldn't this be const?
|
||||
// VFALCO TODO shouldn't this be const?
|
||||
std::vector <uint8_t>& getBuffer()
|
||||
{
|
||||
return mBuffer;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
|
||||
// VFALCO: TODO, remove this when it's safe to do so.
|
||||
// VFALCO TODO remove this when it's safe to do so.
|
||||
#ifdef __APPLICATION__
|
||||
#error Including Application.h is disallowed!
|
||||
#endif
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
/** Protocol specific constant globals.
|
||||
*/
|
||||
// VFALCO: NOTE, use these from now on instead of the macros!!
|
||||
// VFALCO NOTE use these from now on instead of the macros!!
|
||||
class RippleSystem
|
||||
{
|
||||
public:
|
||||
@@ -28,7 +28,7 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
// VFALCO: TODO, I would love to replace these macros with the language
|
||||
// VFALCO TODO I would love to replace these macros with the language
|
||||
// constructs above. The problem is the way they are used at
|
||||
// the point of call, i.e. "User-agent:" SYSTEM_NAME
|
||||
// It will be necessary to rewrite some of them to use string streams.
|
||||
|
||||
@@ -186,7 +186,7 @@ public:
|
||||
const vector& getValue() const { return value; }
|
||||
vector& getValue() { return value; }
|
||||
|
||||
// VFALCO: NOTE as long as we're married to boost why not use boost::iterator_facade?
|
||||
// VFALCO NOTE as long as we're married to boost why not use boost::iterator_facade?
|
||||
//
|
||||
// vector-like functions
|
||||
void push_back(const STObject& object) { value.push_back(object.oClone().release()); }
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
/** Flags for elements in a SerializedObjectTemplate.
|
||||
*/
|
||||
// VFALCO: NOTE, these don't look like bit-flags...
|
||||
// VFALCO NOTE these don't look like bit-flags...
|
||||
enum SOE_Flags
|
||||
{
|
||||
SOE_INVALID = -1,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef RIPPLE_SERIALIZEDTYPES_H
|
||||
#define RIPPLE_SERIALIZEDTYPES_H
|
||||
|
||||
// VFALCO: TODO, fix this restriction on copy assignment.
|
||||
// VFALCO TODO fix this restriction on copy assignment.
|
||||
//
|
||||
// CAUTION: Do not create a vector (or similar container) of any object derived from
|
||||
// SerializedType. Use Boost ptr_* containers. The copy assignment operator of
|
||||
@@ -25,12 +25,12 @@ enum PathFlags
|
||||
PF_ISSUE = 0x80,
|
||||
};
|
||||
|
||||
// VFALCO: TODO, make these non static or otherwise clean constants.
|
||||
// VFALCO TODO make these non static or otherwise clean constants.
|
||||
static const uint160 u160_zero(0), u160_one(1);
|
||||
static inline const uint160& get_u160_zero() { return u160_zero; }
|
||||
static inline const uint160& get_u160_one() { return u160_one; }
|
||||
|
||||
// VFALCO: TODO, replace these with language constructs, gah!
|
||||
// VFALCO TODO replace these with language constructs, gah!
|
||||
#define CURRENCY_XRP get_u160_zero()
|
||||
#define CURRENCY_ONE get_u160_one() // Used as a place holder.
|
||||
#define CURRENCY_BAD uint160(0x5852500000000000) // Do not allow XRP as an IOU currency.
|
||||
@@ -79,7 +79,7 @@ public:
|
||||
virtual bool isDefault() const { return true; }
|
||||
|
||||
protected:
|
||||
// VFALCO: TODO, make accessors for this
|
||||
// VFALCO TODO make accessors for this
|
||||
SField::ptr fName;
|
||||
|
||||
private:
|
||||
@@ -476,7 +476,7 @@ private:
|
||||
}
|
||||
};
|
||||
|
||||
// VFALCO: TODO Make static member accessors for these in STAmount
|
||||
// VFALCO TODO Make static member accessors for these in STAmount
|
||||
extern const STAmount saZero;
|
||||
extern const STAmount saOne;
|
||||
|
||||
@@ -631,7 +631,7 @@ private:
|
||||
class STPathElement
|
||||
{
|
||||
private:
|
||||
// VFALCO: Remove these friend declarations
|
||||
// VFALCO Remove these friend declarations
|
||||
friend class STPathSet;
|
||||
friend class STPath;
|
||||
friend class Pathfinder;
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
#ifndef RIPPLE_TER_H
|
||||
#define RIPPLE_TER_H
|
||||
|
||||
// VFALCO: TODO do not use auto-incrementing. Explicitly assign each
|
||||
// VFALCO TODO do not use auto-incrementing. Explicitly assign each
|
||||
// constant so there is no possibility of someone coming in
|
||||
// and screwing it up.
|
||||
//
|
||||
// VFALCO: TODO, consider renaming TER to TxErr or TxResult for clarity.
|
||||
// VFALCO TODO consider renaming TER to TxErr or TxResult for clarity.
|
||||
//
|
||||
enum TER // aka TransactionEngineResult
|
||||
{
|
||||
@@ -17,7 +17,7 @@ enum TER // aka TransactionEngineResult
|
||||
// - Not forwarded
|
||||
// - No fee check
|
||||
telLOCAL_ERROR = -399,
|
||||
telBAD_DOMAIN, // VFALCO: TODO, should read "telBAD_DOMAIN = -398," etc...
|
||||
telBAD_DOMAIN, // VFALCO TODO should read "telBAD_DOMAIN = -398," etc...
|
||||
telBAD_PATH_COUNT,
|
||||
telBAD_PUBLIC_KEY,
|
||||
telFAILED_PROCESSING,
|
||||
@@ -143,7 +143,7 @@ enum TER // aka TransactionEngineResult
|
||||
tecUNFUNDED = 129, // Deprecated, old ambiguous unfunded.
|
||||
};
|
||||
|
||||
// VFALCO: TODO, change these to normal functions.
|
||||
// VFALCO TODO change these to normal functions.
|
||||
#define isTelLocal(x) ((x) >= telLOCAL_ERROR && (x) < temMALFORMED)
|
||||
#define isTemMalformed(x) ((x) >= temMALFORMED && (x) < tefFAILURE)
|
||||
#define isTefFailure(x) ((x) >= tefFAILURE && (x) < terRETRY)
|
||||
@@ -151,7 +151,7 @@ enum TER // aka TransactionEngineResult
|
||||
#define isTesSuccess(x) ((x) == tesSUCCESS)
|
||||
#define isTecClaim(x) ((x) >= tecCLAIM)
|
||||
|
||||
// VFALCO: TODO, group these into a shell class along with the defines above.
|
||||
// VFALCO TODO group these into a shell class along with the defines above.
|
||||
extern bool transResultInfo (TER terCode, std::string& strToken, std::string& strHuman);
|
||||
extern std::string transToken (TER terCode);
|
||||
extern std::string transHuman (TER terCode);
|
||||
|
||||
@@ -3,7 +3,7 @@ std::map<int, TransactionFormat*> TransactionFormat::byType;
|
||||
|
||||
std::map<std::string, TransactionFormat*> TransactionFormat::byName;
|
||||
|
||||
// VFALCO: TODO, surely we can think of a better way than to use macros??
|
||||
// VFALCO TODO surely we can think of a better way than to use macros??
|
||||
#define TF_BASE \
|
||||
<< SOElement(sfTransactionType, SOE_REQUIRED) \
|
||||
<< SOElement(sfFlags, SOE_OPTIONAL) \
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
#include <openssl/rand.h>
|
||||
#include <openssl/err.h>
|
||||
|
||||
// VFALCO: TODO, fix these warnings!
|
||||
// VFALCO TODO fix these warnings!
|
||||
#ifdef _MSC_VER
|
||||
//#pragma warning (push) // Causes spurious C4503 "decorated name exceeds maximum length"
|
||||
#pragma warning (disable: 4018) // signed/unsigned mismatch
|
||||
@@ -65,7 +65,7 @@
|
||||
#endif
|
||||
|
||||
#include "crypto/ripple_Base58.h" // for RippleAddress
|
||||
#include "crypto/ripple_CKey.h" // needs RippleAddress VFALCO: TODO, remove this dependency cycle
|
||||
#include "crypto/ripple_CKey.h" // needs RippleAddress VFALCO TODO remove this dependency cycle
|
||||
#include "crypto/ripple_RFC1751.h"
|
||||
|
||||
#include "crypto/ripple_CBigNum.cpp"
|
||||
@@ -95,7 +95,7 @@ static const uint64 tenTo17m1 = tenTo17 - 1;
|
||||
#include "protocol/ripple_STAmount.cpp"
|
||||
#include "protocol/ripple_STAmountRound.cpp"
|
||||
|
||||
// VFALCO: TODO Fix this for SConstruct
|
||||
// VFALCO TODO Fix this for SConstruct
|
||||
#ifdef _MSC_VER
|
||||
#include "ripple.pb.cc" // BROKEN because of SConstruct
|
||||
#endif
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
#include <boost/enable_shared_from_this.hpp>
|
||||
#include <boost/functional/hash.hpp>
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include <boost/ptr_container/ptr_vector.hpp> // VFALCO: NOTE, this looks like junk
|
||||
#include <boost/ptr_container/ptr_vector.hpp> // VFALCO NOTE this looks like junk
|
||||
|
||||
#include <openssl/bn.h>
|
||||
#include <openssl/ec.h>
|
||||
@@ -54,15 +54,15 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
// VFALCO: TODO, try to reduce these dependencies
|
||||
// VFALCO TODO try to reduce these dependencies
|
||||
#include "../ripple_basics/ripple_basics.h"
|
||||
|
||||
// VFALCO: TODO, figure out a good place for this file, perhaps give it some
|
||||
// VFALCO TODO figure out a good place for this file, perhaps give it some
|
||||
// additional hierarchy via directories.
|
||||
#include "ripple.pb.h"
|
||||
|
||||
#include "crypto/ripple_CBigNum.h"
|
||||
#include "crypto/ripple_Base58.h" // VFALCO: TODO, Can be moved to .cpp if we clean up setAlphabet stuff
|
||||
#include "crypto/ripple_Base58.h" // VFALCO TODO Can be moved to .cpp if we clean up setAlphabet stuff
|
||||
#include "crypto/ripple_Base58Data.h"
|
||||
|
||||
#include "protocol/ripple_FieldNames.h"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef JSON_AUTOLINK_H_INCLUDED
|
||||
# define JSON_AUTOLINK_H_INCLUDED
|
||||
|
||||
// VFALCO: TODO, remove this file
|
||||
// VFALCO TODO remove this file
|
||||
#error This file is deprecated!
|
||||
|
||||
# include "config.h"
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
#include "ripple_json.h"
|
||||
|
||||
// VFALCO: TODO Remove unneeded includes
|
||||
// VFALCO TODO Remove unneeded includes
|
||||
#include <cstddef>
|
||||
#include <cstdio>
|
||||
#include <cstring>
|
||||
@@ -40,7 +40,7 @@
|
||||
# include <cpptl/conststring.h>
|
||||
#endif
|
||||
|
||||
// VFALCO: TODO, eliminate this boost dependency
|
||||
// VFALCO TODO eliminate this boost dependency
|
||||
#include <boost/lexical_cast.hpp>
|
||||
|
||||
#ifndef JSON_USE_SIMPLE_INTERNAL_ALLOCATOR
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
#ifndef RIPPLE_JSON_H
|
||||
#define RIPPLE_JSON_H
|
||||
|
||||
// VFALCO: TODO Remove unneeded includes
|
||||
// VFALCO TODO Remove unneeded includes
|
||||
#include <cassert>
|
||||
#include <cstring>
|
||||
#include <cstdlib>
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
// VFALCO: TODO, prepare a unity header for LevelDB
|
||||
// VFALCO TODO prepare a unity header for LevelDB
|
||||
#include "leveldb/cache.h"
|
||||
#include "leveldb/filter_policy.h"
|
||||
#include "leveldb/db.h"
|
||||
@@ -74,7 +74,7 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
// VFALCO: TODO, fix these warnings!
|
||||
// VFALCO TODO fix these warnings!
|
||||
#ifdef _MSC_VER
|
||||
//#pragma warning (push) // Causes spurious C4503 "decorated name exceeds maximum length"
|
||||
#pragma warning (disable: 4018) // signed/unsigned mismatch
|
||||
@@ -83,7 +83,7 @@
|
||||
#pragma warning (disable: 4535) // call requires /EHa
|
||||
#endif
|
||||
|
||||
// VFALCO: NOTE, these includes generate warnings, unfortunately.
|
||||
// VFALCO NOTE these includes generate warnings, unfortunately.
|
||||
#include "ripple_main.h"
|
||||
#include "../ripple_data/ripple_data.h"
|
||||
|
||||
@@ -97,7 +97,7 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
//
|
||||
// VFALCO: BEGIN CLEAN AREA
|
||||
// VFALCO BEGIN CLEAN AREA
|
||||
|
||||
#include "src/cpp/ripple/ripple_Config.h"
|
||||
#include "src/cpp/ripple/ripple_DatabaseCon.h"
|
||||
@@ -114,24 +114,24 @@
|
||||
#include "src/cpp/ripple/ripple_IFeeVote.h"
|
||||
#include "src/cpp/ripple/ripple_IHashRouter.h"
|
||||
#include "src/cpp/ripple/ripple_ILoadFeeTrack.h"
|
||||
#include "src/cpp/ripple/ripple_Peer.h" // VFALCO: TODO Rename to IPeer
|
||||
#include "src/cpp/ripple/ripple_Peer.h" // VFALCO TODO Rename to IPeer
|
||||
#include "src/cpp/ripple/ripple_IPeers.h"
|
||||
#include "src/cpp/ripple/ripple_IProofOfWorkFactory.h"
|
||||
#include "src/cpp/ripple/ripple_IUniqueNodeList.h"
|
||||
#include "src/cpp/ripple/ripple_IValidations.h"
|
||||
|
||||
// VFALCO: END CLEAN AREA
|
||||
// VFALCO END CLEAN AREA
|
||||
//
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
// VFALCO: NOTE, Order matters! If you get compile errors, move just 1
|
||||
// VFALCO NOTE Order matters! If you get compile errors, move just 1
|
||||
// include upwards as little as possible to fix it.
|
||||
//
|
||||
#include "src/cpp/ripple/ScriptData.h"
|
||||
#include "src/cpp/ripple/Contract.h"
|
||||
#include "src/cpp/ripple/Interpreter.h"
|
||||
#include "src/cpp/ripple/Operation.h"
|
||||
// VFALCO: NOTE, Order matters
|
||||
// VFALCO NOTE Order matters
|
||||
#include "src/cpp/ripple/AcceptedLedger.h"
|
||||
#include "src/cpp/ripple/AccountItems.h"
|
||||
#include "src/cpp/ripple/AccountSetTransactor.h"
|
||||
@@ -198,7 +198,7 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
// VFALCO: TODO, figure out who needs these and move to a sensible private header.
|
||||
// VFALCO TODO figure out who needs these and move to a sensible private header.
|
||||
static const uint64 tenTo14 = 100000000000000ull;
|
||||
static const uint64 tenTo14m1 = tenTo14 - 1;
|
||||
static const uint64 tenTo17 = tenTo14 * 1000;
|
||||
@@ -208,7 +208,7 @@ static const uint64 tenTo17m1 = tenTo17 - 1;
|
||||
// Generate DH for SSL connection.
|
||||
static DH* handleTmpDh(SSL* ssl, int is_export, int iKeyLength)
|
||||
{
|
||||
// VFALCO: TODO, eliminate this horrendous dependency on theApp and Wallet
|
||||
// VFALCO TODO eliminate this horrendous dependency on theApp and Wallet
|
||||
return 512 == iKeyLength ? theApp->getWallet().getDh512() : theApp->getWallet().getDh1024();
|
||||
}
|
||||
|
||||
|
||||
@@ -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()
|
||||
{
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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; }
|
||||
};
|
||||
|
||||
|
||||
@@ -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
|
||||
};
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
// VFALCO: Should rename ContinuousLedgerTiming to LedgerTiming
|
||||
// VFALCO Should rename ContinuousLedgerTiming to LedgerTiming
|
||||
struct LedgerTimingLog;
|
||||
SETUP_LOG (LedgerTimingLog)
|
||||
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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"))
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
// VFALCO: TODO, rename class to TransactionMeta
|
||||
// VFALCO TODO rename class to TransactionMeta
|
||||
|
||||
SETUP_LOG (TransactionMetaSet)
|
||||
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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.
|
||||
//
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
DECLARE_INSTANCE(HashRouterEntry);
|
||||
|
||||
// VFALCO: TODO Inline the function definitions
|
||||
// VFALCO TODO Inline the function definitions
|
||||
class HashRouter : public IHashRouter
|
||||
{
|
||||
public:
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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 () { }
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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 ();
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
};
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user