Browse Source

Fix up IP port number to be ushort where it is used instead of short.

cl-refactor
Daniel Hams 11 years ago
parent
commit
f61ffdef3f
  1. 2
      alethzero/MainWin.cpp
  2. 4
      eth/main.cpp
  3. 4
      libethereum/Client.cpp
  4. 4
      libethereum/Client.h

2
alethzero/MainWin.cpp

@ -278,7 +278,7 @@ void Main::on_connect_triggered()
if (ok && s.contains(":"))
{
string host = s.section(":", 0, 0).toStdString();
short port = s.section(":", 1).toInt();
ushort port = s.section(":", 1).toInt();
m_client->connect(host, port);
}
}

4
eth/main.cpp

@ -155,9 +155,9 @@ void version()
int main(int argc, char** argv)
{
short listenPort = 30303;
ushort listenPort = 30303;
string remoteHost;
short remotePort = 30303;
ushort remotePort = 30303;
bool interactive = false;
string dbPath;
eth::uint mining = ~(eth::uint)0;

4
libethereum/Client.cpp

@ -62,7 +62,7 @@ Client::~Client()
this_thread::sleep_for(chrono::milliseconds(10));
}
void Client::startNetwork(short _listenPort, std::string const& _seedHost, short _port, NodeMode _mode, unsigned _peers, string const& _publicIP, bool _upnp)
void Client::startNetwork(ushort _listenPort, std::string const& _seedHost, ushort _port, NodeMode _mode, unsigned _peers, string const& _publicIP, bool _upnp)
{
if (m_net)
return;
@ -72,7 +72,7 @@ void Client::startNetwork(short _listenPort, std::string const& _seedHost, short
connect(_seedHost, _port);
}
void Client::connect(std::string const& _seedHost, short _port)
void Client::connect(std::string const& _seedHost, ushort _port)
{
if (!m_net)
return;

4
libethereum/Client.h

@ -106,9 +106,9 @@ public:
unsigned peerCount() const { return m_net ? m_net->peerCount() : 0; }
/// Start the network subsystem.
void startNetwork(short _listenPort = 30303, std::string const& _seedHost = std::string(), short _port = 30303, NodeMode _mode = NodeMode::Full, unsigned _peers = 5, std::string const& _publicIP = std::string(), bool _upnp = true);
void startNetwork(ushort _listenPort = 30303, std::string const& _seedHost = std::string(), ushort _port = 30303, NodeMode _mode = NodeMode::Full, unsigned _peers = 5, std::string const& _publicIP = std::string(), bool _upnp = true);
/// Connect to a particular peer.
void connect(std::string const& _seedHost, short _port = 30303);
void connect(std::string const& _seedHost, ushort _port = 30303);
/// Stop the network subsystem.
void stopNetwork();
/// Get access to the peer server object. This will be null if the network isn't online.

Loading…
Cancel
Save