diff --git a/src/Config.cpp b/src/Config.cpp index f399b05965..31a674e762 100644 --- a/src/Config.cpp +++ b/src/Config.cpp @@ -116,6 +116,7 @@ void Config::setup(const std::string& strConf) PEER_PORT = SYSTEM_PEER_PORT; RPC_PORT = 5001; + WEBSOCKET_PORT = SYSTEM_WEBSOCKET_PORT; NUMBER_CONNECTIONS = 30; // a new ledger every minute diff --git a/src/Config.h b/src/Config.h index 693b00d373..c026439533 100644 --- a/src/Config.h +++ b/src/Config.h @@ -22,7 +22,9 @@ #define DEFAULT_VALIDATORS_SITE "redstem.com" #define VALIDATORS_FILE_NAME "validators.txt" -const int SYSTEM_PEER_PORT = 6561; + +const int SYSTEM_PEER_PORT = 6561; +const int SYSTEM_WEBSOCKET_PORT = 6562; // Allow anonymous DH. #define DEFAULT_PEER_SSL_CIPHER_LIST "ALL:!LOW:!EXP:!MD5:@STRENGTH" @@ -40,59 +42,59 @@ class Config { public: // Core software parameters - int VERSION; - std::string VERSION_STR; + int VERSION; + std::string VERSION_STR; // Configuration parameters - boost::filesystem::path CONFIG_FILE; - boost::filesystem::path CONFIG_DIR; - boost::filesystem::path DATA_DIR; - boost::filesystem::path UNL_DEFAULT; + boost::filesystem::path CONFIG_FILE; + boost::filesystem::path CONFIG_DIR; + boost::filesystem::path DATA_DIR; + boost::filesystem::path UNL_DEFAULT; - std::string VALIDATORS_SITE; // Where to find validators.txt on the Internet. - std::vector VALIDATORS; // Validators from newcoind.cfg + std::string VALIDATORS_SITE; // Where to find validators.txt on the Internet. + std::vector VALIDATORS; // Validators from newcoind.cfg // Network parameters - int NETWORK_START_TIME; // The Unix time we start ledger 0 - int TRANSACTION_FEE_BASE; - int LEDGER_SECONDS; - int LEDGER_PROPOSAL_DELAY_SECONDS; - int LEDGER_AVALANCHE_SECONDS; + int NETWORK_START_TIME; // The Unix time we start ledger 0 + int TRANSACTION_FEE_BASE; + int LEDGER_SECONDS; + int LEDGER_PROPOSAL_DELAY_SECONDS; + int LEDGER_AVALANCHE_SECONDS; // 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 VALIDATION_QUORUM; // Minimum validations to consider ledger authoritative + int NETWORK_QUORUM; // Minimum number of nodes to consider the network present + int VALIDATION_QUORUM; // Minimum validations to consider ledger authoritative // Peer networking parameters - std::string PEER_IP; - int PEER_PORT; - int NUMBER_CONNECTIONS; - std::string PEER_SSL_CIPHER_LIST; - int PEER_SCAN_INTERVAL_MIN; - int PEER_START_MAX; - int PEER_CONNECT_LOW_WATER; + std::string PEER_IP; + int PEER_PORT; + int NUMBER_CONNECTIONS; + std::string PEER_SSL_CIPHER_LIST; + int PEER_SCAN_INTERVAL_MIN; + int PEER_START_MAX; + int PEER_CONNECT_LOW_WATER; - // Client networking parameters - std::string WEBSOCKET_IP; - int WEBSOCKET_PORT; + // Websocket networking parameters + std::string WEBSOCKET_IP; + int WEBSOCKET_PORT; // RPC parameters - std::string RPC_IP; - int RPC_PORT; - std::string RPC_USER; - std::string RPC_PASSWORD; - bool RPC_ALLOW_REMOTE; + std::string RPC_IP; + int RPC_PORT; + std::string RPC_USER; + std::string RPC_PASSWORD; + bool RPC_ALLOW_REMOTE; // Validation - NewcoinAddress VALIDATION_SEED; + NewcoinAddress VALIDATION_SEED; // Fees - uint64 FEE_DEFAULT; // Default fee. - uint64 FEE_ACCOUNT_CREATE; // Fee to create an account. - uint64 FEE_NICKNAME_CREATE; // Fee to create a nickname. + uint64 FEE_DEFAULT; // Default fee. + uint64 FEE_ACCOUNT_CREATE; // Fee to create an account. + uint64 FEE_NICKNAME_CREATE; // Fee to create a nickname. // Client behavior - int ACCOUNT_PROBE_MAX; // How far to scan for accounts. + int ACCOUNT_PROBE_MAX; // How far to scan for accounts. void setup(const std::string& strConf); void load(); diff --git a/src/PeerDoor.cpp b/src/PeerDoor.cpp index 3ed7a6bd02..3544816729 100644 --- a/src/PeerDoor.cpp +++ b/src/PeerDoor.cpp @@ -49,7 +49,7 @@ void PeerDoor::startListening() void PeerDoor::handleConnect(Peer::pointer new_connection, const boost::system::error_code& error) { - if(!error) + if (!error) { new_connection->connected(error); } @@ -57,4 +57,5 @@ void PeerDoor::handleConnect(Peer::pointer new_connection, startListening(); } + // vim:ts=4 diff --git a/src/PeerDoor.h b/src/PeerDoor.h index 52b8fae1ee..ac472ee0e9 100644 --- a/src/PeerDoor.h +++ b/src/PeerDoor.h @@ -1,3 +1,6 @@ +#ifndef __PEERDOOR__ +#define __PEERDOOR__ + #include #include @@ -22,4 +25,7 @@ private: public: PeerDoor(boost::asio::io_service& io_service); }; + +#endif + // vim:ts=4