Browse Source

Indentation style fixes

cl-refactor
Lefteris Karapetsas 10 years ago
parent
commit
5f191f4f89
  1. 24
      libdevcore/StructuredLogger.h
  2. 9
      libethereum/Client.h
  3. 6
      libp2p/Host.h
  4. 15
      libwebthree/WebThree.cpp
  5. 13
      libwebthree/WebThree.h

24
libdevcore/StructuredLogger.h

@ -59,25 +59,33 @@ public:
static void starting(std::string const& _clientImpl, const char* _ethVersion); static void starting(std::string const& _clientImpl, const char* _ethVersion);
static void stopping(std::string const& _clientImpl, const char* _ethVersion); static void stopping(std::string const& _clientImpl, const char* _ethVersion);
static void p2pConnected(std::string const& _id, static void p2pConnected(
std::string const& _id,
bi::tcp::endpoint const& _addr, bi::tcp::endpoint const& _addr,
std::chrono::system_clock::time_point const& _ts, std::chrono::system_clock::time_point const& _ts,
std::string const& _remoteVersion, std::string const& _remoteVersion,
unsigned int _numConnections); unsigned int _numConnections
);
static void p2pDisconnected(std::string const& _id, bi::tcp::endpoint const& _addr, unsigned int _numConnections); static void p2pDisconnected(std::string const& _id, bi::tcp::endpoint const& _addr, unsigned int _numConnections);
static void minedNewBlock(std::string const& _hash, static void minedNewBlock(
std::string const& _hash,
std::string const& _blockNumber, std::string const& _blockNumber,
std::string const& _chainHeadHash, std::string const& _chainHeadHash,
std::string const& _prevHash); std::string const& _prevHash
static void chainReceivedNewBlock(std::string const& _hash, );
static void chainReceivedNewBlock(
std::string const& _hash,
std::string const& _blockNumber, std::string const& _blockNumber,
std::string const& _chainHeadHash, std::string const& _chainHeadHash,
std::string const& _remoteID, std::string const& _remoteID,
std::string const& _prevHash); std::string const& _prevHash
static void chainNewHead(std::string const& _hash, );
static void chainNewHead(
std::string const& _hash,
std::string const& _blockNumber, std::string const& _blockNumber,
std::string const& _chainHeadHash, std::string const& _chainHeadHash,
std::string const& _prevHash); std::string const& _prevHash
);
static void transactionReceived(std::string const& _hash, std::string const& _remoteId); static void transactionReceived(std::string const& _hash, std::string const& _remoteId);
private: private:
// Singleton class. Private default ctor and no copying // Singleton class. Private default ctor and no copying

9
libethereum/Client.h

@ -167,8 +167,13 @@ class Client: public MinerHost, public Interface, Worker
public: public:
/// New-style Constructor. /// New-style Constructor.
explicit Client(p2p::Host* _host, std::string const& _dbPath = std::string(), bool _forceClean = false, explicit Client(
u256 _networkId = 0, int _miners = -1); p2p::Host* _host,
std::string const& _dbPath = std::string(),
bool _forceClean = false,
u256 _networkId = 0,
int _miners = -1
);
/// Destructor. /// Destructor.
virtual ~Client(); virtual ~Client();

6
libp2p/Host.h

@ -85,8 +85,10 @@ class Host: public Worker
public: public:
/// Start server, listening for connections on the given port. /// Start server, listening for connections on the given port.
Host(std::string const& _clientVersion, NetworkPreferences const& _n = NetworkPreferences(), Host(std::string const& _clientVersion,
bytesConstRef _restoreNetwork = bytesConstRef()); NetworkPreferences const& _n = NetworkPreferences(),
bytesConstRef _restoreNetwork = bytesConstRef()
);
/// Will block on network process events. /// Will block on network process events.
virtual ~Host(); virtual ~Host();

15
libwebthree/WebThree.cpp

@ -35,11 +35,16 @@ using namespace dev::p2p;
using namespace dev::eth; using namespace dev::eth;
using namespace dev::shh; using namespace dev::shh;
WebThreeDirect::WebThreeDirect(std::string const& _clientVersion, std::string const& _dbPath, bool _forceClean, WebThreeDirect::WebThreeDirect(
std::set<std::string> const& _interfaces, NetworkPreferences const& _n, std::string const& _clientVersion,
bytesConstRef _network, int _miners): std::string const& _dbPath,
m_clientVersion(_clientVersion), bool _forceClean,
m_net(_clientVersion, _n, _network) std::set<std::string> const& _interfaces,
NetworkPreferences const& _n,
bytesConstRef _network, int _miners
):
m_clientVersion(_clientVersion),
m_net(_clientVersion, _n, _network)
{ {
if (_dbPath.size()) if (_dbPath.size())
Defaults::setDBPath(_dbPath); Defaults::setDBPath(_dbPath);

13
libwebthree/WebThree.h

@ -103,10 +103,15 @@ class WebThreeDirect : public WebThreeNetworkFace
public: public:
/// Constructor for private instance. If there is already another process on the machine using @a _dbPath, then this will throw an exception. /// Constructor for private instance. If there is already another process on the machine using @a _dbPath, then this will throw an exception.
/// ethereum() may be safely static_cast()ed to a eth::Client*. /// ethereum() may be safely static_cast()ed to a eth::Client*.
WebThreeDirect(std::string const& _clientVersion, std::string const& _dbPath, bool _forceClean = false, WebThreeDirect(
std::set<std::string> const& _interfaces = {"eth", "shh"}, std::string const& _clientVersion,
p2p::NetworkPreferences const& _n = p2p::NetworkPreferences(), std::string const& _dbPath,
bytesConstRef _network = bytesConstRef(), int _miners = -1); bool _forceClean = false,
std::set<std::string> const& _interfaces = {"eth", "shh"},
p2p::NetworkPreferences const& _n = p2p::NetworkPreferences(),
bytesConstRef _network = bytesConstRef(),
int _miners = -1
);
/// Destructor. /// Destructor.
~WebThreeDirect(); ~WebThreeDirect();

Loading…
Cancel
Save