Skip to content

Commit

Permalink
Merge pull request ethereum-mining#1723 from AndreaLanfranchi/master
Browse files Browse the repository at this point in the history
Modified URI Parsing (Username / WorkerName / Password)
  • Loading branch information
StefanOberhumer committed Nov 29, 2018
2 parents 07ea6f9 + f045321 commit 76a5aad
Show file tree
Hide file tree
Showing 6 changed files with 217 additions and 239 deletions.
2 changes: 1 addition & 1 deletion ethminer/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ class MinerCLI

URI uri(url);

if (!uri.Valid() || !uri.KnownScheme() || (m_mode == OperationMode::Mining && uri.Scheme() == "simulation"))
if (!uri.Valid() || (m_mode == OperationMode::Mining && uri.Scheme() == "simulation"))
{
std::string what = "Bad URI : " + uri.str();
throw std::invalid_argument(what);
Expand Down
6 changes: 0 additions & 6 deletions libapicore/ApiServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -503,12 +503,6 @@ void ApiConnection::processRequest(Json::Value& jRequest, Json::Value& jResponse
jResponse["error"]["message"] = ("Invalid URI " + uri.str());
return;
}
if (!uri.KnownScheme())
{
jResponse["error"]["code"] = -422;
jResponse["error"]["message"] = ("Unknown URI scheme " + uri.Scheme());
return;
}

// Check other pools already present share the same scheme family (stratum or getwork)
Json::Value pools = PoolManager::p().getConnectionsJson();
Expand Down
Loading

0 comments on commit 76a5aad

Please sign in to comment.