Add currency name and percision to Config.h

This commit is contained in:
Arthur Britto
2012-05-19 18:17:00 -07:00
parent 82085f0264
commit 5142807109
2 changed files with 38 additions and 41 deletions

View File

@@ -7,6 +7,7 @@
#include <fstream> #include <fstream>
#include <boost/lexical_cast.hpp> #include <boost/lexical_cast.hpp>
// Fees are in XNS raw.
#define DEFAULT_FEE_CREATE 1000 #define DEFAULT_FEE_CREATE 1000
#define DEFAULT_FEE_DEFAULT 100 #define DEFAULT_FEE_DEFAULT 100
@@ -121,15 +122,6 @@ void Config::load()
FEE_DEFAULT = boost::lexical_cast<int>(strTemp); FEE_DEFAULT = boost::lexical_cast<int>(strTemp);
} }
} }
/*
node=root.child("DB_TYPE");
if(!node.empty())
{
if( stricmp(node.child_value(),"mysql")==0 ) theApp->setDB(Database::newMysqlDatabase("host","user","pass"));
else theApp->setSerializer(new DiskSerializer());
}else */
} }
// vim:ts=4 // vim:ts=4

View File

@@ -2,11 +2,14 @@
#define __CONFIG__ #define __CONFIG__
#include "types.h" #include "types.h"
#include "SerializedTypes.h"
#include <string> #include <string>
#define SYSTEM_NAME "newcoin" #define SYSTEM_NAME "newcoin"
#define VALIDATORS_SITE "redstem.com" #define VALIDATORS_SITE "redstem.com"
#define SYSTEM_CURRENCY_CODE "XNS"
#define SYSTEM_CURRENCY_PRECISION 6
#define VALIDATORS_FILE_NAME "validators.txt" #define VALIDATORS_FILE_NAME "validators.txt"
const int SYSTEM_PEER_PORT = 6561; const int SYSTEM_PEER_PORT = 6561;
@@ -26,47 +29,49 @@ const int SYSTEM_PEER_PORT = 6561;
class Config class Config
{ {
public: public:
// core software parameters // Core software parameters
int VERSION; int VERSION;
std::string VERSION_STR; std::string VERSION_STR;
// network parameters // Network parameters
int NETWORK_START_TIME; // The Unix time we start ledger 0 int NETWORK_START_TIME; // The Unix time we start ledger 0
int TRANSACTION_FEE_BASE; int TRANSACTION_FEE_BASE;
int LEDGER_SECONDS; int LEDGER_SECONDS;
int LEDGER_PROPOSAL_DELAY_SECONDS; int LEDGER_PROPOSAL_DELAY_SECONDS;
int LEDGER_AVALANCHE_SECONDS; int LEDGER_AVALANCHE_SECONDS;
// Note: The following parameters do not relate to the UNL or trust at all // Note: The following parameters do not relate to the UNL or trust at all
int NETWORK_QUORUM; // Minimum number of nodes to consider the network present int NETWORK_QUORUM; // Minimum number of nodes to consider the network present
int VALIDATION_QUORUM; // Minimum validations to consider ledger authoritative int VALIDATION_QUORUM; // Minimum validations to consider ledger authoritative
// node networking parameters // Peer networking parameters
std::string PEER_IP; std::string PEER_IP;
int PEER_PORT; int PEER_PORT;
int NUMBER_CONNECTIONS; int NUMBER_CONNECTIONS;
// bool NODE_INBOUND; // we accept inbound connections
// bool NODE_DATABASE; // we offer historical data services
// bool NODE_PUBLIC; // we do not attempt to hide our identity
// bool NODE_DUMB; // we are a 'dumb' client
// bool NODE_SMART; // we offer services to 'dumb' clients
// RPC parameters
std::string RPC_IP;
int RPC_PORT;
std::string RPC_USER;
std::string RPC_PASSWORD;
std::string VALIDATION_PASSWORD;
std::string VALIDATION_KEY;
std::string PEER_SSL_CIPHER_LIST; std::string PEER_SSL_CIPHER_LIST;
int PEER_SCAN_INTERVAL_MIN; int PEER_SCAN_INTERVAL_MIN;
int PEER_START_MAX; int PEER_START_MAX;
int PEER_CONNECT_LOW_WATER; int PEER_CONNECT_LOW_WATER;
uint64 FEE_CREATE; // Fee to create an account // bool NODE_INBOUND; // We accept inbound connections
uint64 FEE_DEFAULT; // Default fee. // bool NODE_DATABASE; // We offer historical data services
// bool NODE_PUBLIC; // We do not attempt to hide our identity
// bool NODE_DUMB; // We are a 'dumb' client
// bool NODE_SMART; // We offer services to 'dumb' clients
// RPC parameters
std::string RPC_IP;
int RPC_PORT;
std::string RPC_USER;
std::string RPC_PASSWORD;
// Validation
std::string VALIDATION_PASSWORD;
std::string VALIDATION_KEY;
// Fees
STAmount FEE_CREATE; // Fee to create an account
STAmount FEE_DEFAULT; // Default fee.
// configuration parameters // configuration parameters
std::string DATA_DIR; std::string DATA_DIR;