Skip to content

Commit

Permalink
Working on supporting multiple chains
Browse files Browse the repository at this point in the history
  • Loading branch information
tjayrush committed Sep 1, 2021
1 parent 485d183 commit af24fe5
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/libs/etherlib/node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -616,12 +616,16 @@ string_q getVersionFromClient(void) {
// We do this to avoid constantly hitting the node just to see if it's there.
// If the rpcProvider changed or we haven't checked for a while, check it again.
string_q clientVersion = callRPC("web3_clientVersion", "[]", false);
stringToAsciiFile(clientVersionFn, getCurlContext()->baseURL + "\t" + clientVersion);
return clientVersion;
if (!clientVersion.empty()) {
stringToAsciiFile(clientVersionFn, getCurlContext()->baseURL + "\t" + clientVersion);
return clientVersion;
}
}

CStringArray parts;
explode(parts, contents, '\t');
if (parts.size() < 2)
return uint_2_Str(NOPOS);
return parts[1];
}

Expand All @@ -637,8 +641,9 @@ bool isGeth(void) {

//-------------------------------------------------------------------------
bool isParity(void) {
return contains(toLower(getVersionFromClient()), "parity") ||
contains(toLower(getVersionFromClient()), "openethereum");
return isErigon() ||
contains(toLower(getVersionFromClient()), "parity") ||
contains(toLower(getVersionFromClient()), "openethereum");
}

//--------------------------------------------------------------------------
Expand Down

0 comments on commit af24fe5

Please sign in to comment.