Put modules in ripple namespace

This commit is contained in:
Vinnie Falco
2013-06-27 13:41:20 -07:00
parent 8588587b71
commit 638656a597
35 changed files with 198 additions and 234 deletions

View File

@@ -8,6 +8,8 @@ BOOST_AUTO_TEST_SUITE (quality)
BOOST_AUTO_TEST_CASE ( getquality )
{
using namespace ripple;
uint256 uBig ("D2DC44E5DC189318DB36EF87D2104CDF0A0FE3A4B698BEEE55038D7EA4C68000");
if (6125895493223874560 != Ledger::getQuality (uBig))

View File

@@ -119,7 +119,7 @@ void printHelp (const po::options_description& desc)
// cerr << " trust_set <seed> <paying_account> <destination_account> <limit_amount> <currency> [<quality_in>] [<quality_out>]" << endl;
}
int main (int argc, char* argv[])
int rippleMain (int argc, char** argv)
{
setCallingThreadName ("main");
int iResult = 0;

View File

@@ -267,17 +267,5 @@ inline LedgerEntrySet::iterator range_end (LedgerEntrySet& x)
{
return x.end ();
}
namespace boost
{
template<> struct range_mutable_iterator<LedgerEntrySet>
{
typedef LedgerEntrySet::iterator type;
};
template<> struct range_const_iterator<LedgerEntrySet>
{
typedef LedgerEntrySet::const_iterator type;
};
}
#endif
// vim:ts=4

View File

@@ -10,8 +10,6 @@
// A pathfinding request submitted by a client
// The request issuer must maintain a strong pointer
class InfoSub;
class STAmount;
class RippleLineCache;
// Return values from parseJson <0 = invalid, >0 = valid

View File

@@ -8,6 +8,8 @@ BOOST_AUTO_TEST_SUITE (ProofOfWork_suite)
BOOST_AUTO_TEST_CASE ( ProofOfWork_test )
{
using namespace ripple;
ProofOfWorkFactory gen;
ProofOfWork pow = gen.getProof ();
WriteLog (lsINFO, ProofOfWork) << "Estimated difficulty: " << pow.getDifficulty ();

View File

@@ -8,6 +8,9 @@
#define SMS_DEBUG
#endif
namespace ripple
{
static SHAMapItem::pointer makeRandomAS ()
{
Serializer s;
@@ -55,10 +58,14 @@ static bool confuseMap (SHAMap& map, int count)
return true;
}
}
BOOST_AUTO_TEST_SUITE ( SHAMapSync )
BOOST_AUTO_TEST_CASE ( SHAMapSync_test )
{
using namespace ripple;
WriteLog (lsTRACE, SHAMap) << "begin sync test";
unsigned int seed;
RAND_pseudo_bytes (reinterpret_cast<unsigned char*> (&seed), sizeof (seed));

View File

@@ -6,20 +6,25 @@
// VFALCO TODO Rename this to createFilledVector and pass an unsigned char, tidy up
//
static Blob IntToVUC (int v)
namespace ripple
{
Blob vuc;
static Blob IntToVUC (int v)
{
Blob vuc;
for (int i = 0; i < 32; ++i)
vuc.push_back (static_cast<unsigned char> (v));
for (int i = 0; i < 32; ++i)
vuc.push_back (static_cast<unsigned char> (v));
return vuc;
return vuc;
}
}
BOOST_AUTO_TEST_SUITE (SHAMap_suite)
BOOST_AUTO_TEST_CASE ( SHAMap_test )
{
using namespace ripple;
// h3 and h4 differ only in the leaf, same terminal node (level 19)
WriteLog (lsTRACE, SHAMap) << "SHAMap test";
uint256 h1, h2, h3, h4, h5;

View File

@@ -7,6 +7,8 @@ BOOST_AUTO_TEST_SUITE (SerializedTransactionTS)
BOOST_AUTO_TEST_CASE ( STrans_test )
{
using namespace ripple;
RippleAddress seed;
seed.setSeedRandom ();
RippleAddress generator = RippleAddress::createGeneratorPublic (seed);

View File

@@ -7,9 +7,6 @@
#ifndef RIPPLE_SQLITEDATABASE_RIPPLEHEADER
#define RIPPLE_SQLITEDATABASE_RIPPLEHEADER
struct sqlite3;
struct sqlite3_stmt;
class SqliteDatabase : public Database
{
public: