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 <boost/lexical_cast.hpp>
// Fees are in XNS raw.
#define DEFAULT_FEE_CREATE 1000
#define DEFAULT_FEE_DEFAULT 100
@@ -121,15 +122,6 @@ void Config::load()
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

View File

@@ -2,11 +2,14 @@
#define __CONFIG__
#include "types.h"
#include "SerializedTypes.h"
#include <string>
#define SYSTEM_NAME "newcoin"
#define VALIDATORS_SITE "redstem.com"
#define SYSTEM_CURRENCY_CODE "XNS"
#define SYSTEM_CURRENCY_PRECISION 6
#define VALIDATORS_FILE_NAME "validators.txt"
const int SYSTEM_PEER_PORT = 6561;
@@ -26,11 +29,11 @@ const int SYSTEM_PEER_PORT = 6561;
class Config
{
public:
// core software parameters
// Core software parameters
int VERSION;
std::string VERSION_STR;
// network parameters
// Network parameters
int NETWORK_START_TIME; // The Unix time we start ledger 0
int TRANSACTION_FEE_BASE;
int LEDGER_SECONDS;
@@ -41,15 +44,20 @@ public:
int NETWORK_QUORUM; // Minimum number of nodes to consider the network present
int VALIDATION_QUORUM; // Minimum validations to consider ledger authoritative
// node networking parameters
// Peer networking parameters
std::string PEER_IP;
int PEER_PORT;
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
std::string PEER_SSL_CIPHER_LIST;
int PEER_SCAN_INTERVAL_MIN;
int PEER_START_MAX;
int PEER_CONNECT_LOW_WATER;
// 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;
@@ -57,16 +65,13 @@ public:
std::string RPC_USER;
std::string RPC_PASSWORD;
// Validation
std::string VALIDATION_PASSWORD;
std::string VALIDATION_KEY;
std::string PEER_SSL_CIPHER_LIST;
int PEER_SCAN_INTERVAL_MIN;
int PEER_START_MAX;
int PEER_CONNECT_LOW_WATER;
uint64 FEE_CREATE; // Fee to create an account
uint64 FEE_DEFAULT; // Default fee.
// Fees
STAmount FEE_CREATE; // Fee to create an account
STAmount FEE_DEFAULT; // Default fee.
// configuration parameters
std::string DATA_DIR;