Move some constants to core/SystemParameters.h

This commit is contained in:
Vinnie Falco
2014-09-16 16:33:57 -07:00
parent 89a51e5b91
commit 3fef916972
8 changed files with 21 additions and 20 deletions

View File

@@ -2459,6 +2459,8 @@
</ClInclude>
<ClInclude Include="..\..\src\ripple\core\Section.h">
</ClInclude>
<ClInclude Include="..\..\src\ripple\core\SystemParameters.h">
</ClInclude>
<ClCompile Include="..\..\src\ripple\data\crypto\Base58Data.cpp">
<ExcludedFromBuild>True</ExcludedFromBuild>
</ClCompile>
@@ -2504,8 +2506,6 @@
</ClCompile>
<ClInclude Include="..\..\src\ripple\data\protocol\RippleAddress.h">
</ClInclude>
<ClInclude Include="..\..\src\ripple\data\protocol\RippleSystem.h">
</ClInclude>
<ClCompile Include="..\..\src\ripple\data\protocol\SerializedObjectTemplate.cpp">
<ExcludedFromBuild>True</ExcludedFromBuild>
</ClCompile>

View File

@@ -3525,6 +3525,9 @@
<ClInclude Include="..\..\src\ripple\core\Section.h">
<Filter>ripple\core</Filter>
</ClInclude>
<ClInclude Include="..\..\src\ripple\core\SystemParameters.h">
<Filter>ripple\core</Filter>
</ClInclude>
<ClCompile Include="..\..\src\ripple\data\crypto\Base58Data.cpp">
<Filter>ripple\data\crypto</Filter>
</ClCompile>
@@ -3579,9 +3582,6 @@
<ClInclude Include="..\..\src\ripple\data\protocol\RippleAddress.h">
<Filter>ripple\data\protocol</Filter>
</ClInclude>
<ClInclude Include="..\..\src\ripple\data\protocol\RippleSystem.h">
<Filter>ripple\data\protocol</Filter>
</ClInclude>
<ClCompile Include="..\..\src\ripple\data\protocol\SerializedObjectTemplate.cpp">
<Filter>ripple\data\protocol</Filter>
</ClCompile>

View File

@@ -21,6 +21,7 @@
#define RIPPLE_CORE_CONFIG_H_INCLUDED
#include <ripple/core/Section.h>
#include <ripple/core/SystemParameters.h>
#include <ripple/data/protocol/RippleAddress.h>
#include <ripple/unity/json.h>
#include <beast/http/URL.h>
@@ -99,15 +100,6 @@ protected:
//------------------------------------------------------------------------------
// VFALCO TODO Replace these with beast "unsigned long long" generators
// VFALCO NOTE Apparently these are used elsewhere. Make them constants in the config
// or in the Application
//
#define SYSTEM_CURRENCY_GIFT 1000ull
#define SYSTEM_CURRENCY_USERS 100000000ull
#define SYSTEM_CURRENCY_PARTS 1000000ull // 10^SYSTEM_CURRENCY_PRECISION
#define SYSTEM_CURRENCY_START (SYSTEM_CURRENCY_GIFT*SYSTEM_CURRENCY_USERS*SYSTEM_CURRENCY_PARTS)
const int SYSTEM_PEER_PORT = 6561;
enum SizedItemName

View File

@@ -17,8 +17,8 @@
*/
//==============================================================================
#ifndef RIPPLE_RIPPLESYSTEM_H
#define RIPPLE_RIPPLESYSTEM_H
#ifndef RIPPLE_CORE_SYSTEMPARAMETERS_H_INCLUDED
#define RIPPLE_CORE_SYSTEMPARAMETERS_H_INCLUDED
namespace ripple {
@@ -56,6 +56,15 @@ public:
#define SYSTEM_NAME "ripple"
#define SYSTEM_CURRENCY_PRECISION 6
// VFALCO TODO Replace with C++11 long long constants
// VFALCO NOTE Apparently these are used elsewhere. Make them constants in the config
// or in the Application
//
#define SYSTEM_CURRENCY_GIFT 1000ull
#define SYSTEM_CURRENCY_USERS 100000000ull
#define SYSTEM_CURRENCY_PARTS 1000000ull // 10^SYSTEM_CURRENCY_PRECISION
#define SYSTEM_CURRENCY_START (SYSTEM_CURRENCY_GIFT*SYSTEM_CURRENCY_USERS*SYSTEM_CURRENCY_PARTS)
} // ripple
#endif

View File

@@ -20,7 +20,7 @@
#include <ripple/core/Config.h>
#include <ripple/core/ConfigSections.h>
#include <ripple/basics/Log.h>
#include <ripple/data/protocol/RippleSystem.h>
#include <ripple/core/SystemParameters.h>
#include <ripple/net/HTTPClient.h>
#include <beast/http/ParsedURL.h>
#include <beast/module/core/text/LexicalCast.h>

View File

@@ -17,8 +17,9 @@
*/
//==============================================================================
#include <ripple/types/UintTypes.h>
#include <ripple/core/SystemParameters.h>
#include <ripple/data/protocol/STAmount.h>
#include <ripple/types/UintTypes.h>
#include <beast/cxx14/iterator.h>
namespace ripple {

View File

@@ -19,7 +19,7 @@
#include <ripple/common/jsonrpc_fields.h>
#include <ripple/data/protocol/BuildInfo.h>
#include <ripple/data/protocol/RippleSystem.h>
#include <ripple/core/SystemParameters.h>
namespace ripple {

View File

@@ -34,7 +34,6 @@ typedef struct bignum_st BIGNUM;
#include <ripple/data/protocol/HashPrefix.h>
#include <ripple/data/protocol/Protocol.h>
#include <ripple/data/protocol/RippleAddress.h>
#include <ripple/data/protocol/RippleSystem.h>
#include <ripple/data/protocol/Serializer.h> // needs CKey
#include <ripple/data/protocol/TER.h>
#include <ripple/data/protocol/SerializedTypes.h> // needs Serializer, TER