Skip to content
This repository was archived by the owner on Apr 24, 2022. It is now read-only.

Commit 07cfba7

Browse files
authoredJun 24, 2018
Merge pull request #1300 from StefanOberhumer/MinimalChanges
Different small changes
2 parents 39c6941 + 3bac573 commit 07cfba7

File tree

5 files changed

+12
-11
lines changed

5 files changed

+12
-11
lines changed
 

‎CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
1010

1111
- Basic API authentication to protect exposure of API port to the internet [#1228](https://github.com/ethereum-mining/ethminer/pull/1228).
1212
- Add `ispaused` information into response of `miner_getstathr` API query [#1232](https://github.com/ethereum-mining/ethminer/pull/1232).
13+
- API responses return "ethminer-" as version prefix. [#1300](https://github.com/ethereum-mining/ethminer/pull/1300).
1314

1415
## 0.15.0rc1
1516

‎docs/API_DOCUMENTATION.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ and expect back a response like this:
176176
"id": 1,
177177
"jsonrpc": "2.0",
178178
"result": [
179-
"0.16.0.dev0+commit.41639944", // The actual release of ethminer
179+
"ethminer-0.16.0.dev0+commit.41639944", // Running ethminer's version
180180
"48", // Total running time in minutes
181181
"87221;54;0", // ETH hashrate in KH/s, submitted shares, rejected shares
182182
"14683;14508;14508;14508;14508;14508", // Detailed ETH hashrate in KH/s per GPU
@@ -257,7 +257,7 @@ and expect back a response like this:
257257
true,
258258
false
259259
],
260-
"version": "0.16.0.dev0+commit.41639944" // Running ethminer's version
260+
"version": "ethminer-0.16.0.dev0+commit.41639944" // Running ethminer's version
261261
}
262262
}
263263
```

‎libapicore/ApiServer.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -625,7 +625,7 @@ Json::Value ApiConnection::getMinerStat1()
625625

626626
Json::Value jRes;
627627

628-
jRes[0] = ethminer_get_buildinfo()->project_version; //miner version.
628+
jRes[0] = std::string("ethminer-") + ethminer_get_buildinfo()->project_version; //miner version.
629629
jRes[1] = toString(runningTime.count()); // running time, in minutes.
630630
jRes[2] = totalMhEth.str(); // total ETH hashrate in MH/s, number of ETH shares, number of ETH rejected shares.
631631
jRes[3] = detailedMhEth.str(); // detailed ETH hashrate for all GPUs.
@@ -657,7 +657,7 @@ Json::Value ApiConnection::getMinerStatHR()
657657
Json::Value ispaused;
658658
ostringstream poolAddresses;
659659

660-
version << ethminer_get_buildinfo()->project_version;
660+
version << "ethminer-" << ethminer_get_buildinfo()->project_version;
661661
runtime << toString(runningTime.count());
662662
poolAddresses << m_farm.get_pool_addresses();
663663

@@ -681,8 +681,8 @@ Json::Value ApiConnection::getMinerStatHR()
681681
}
682682

683683
Json::Value jRes;
684-
jRes["version"] = version.str(); // miner version.
685-
jRes["runtime"] = runtime.str(); // running time, in minutes.
684+
jRes["version"] = version.str(); // miner version.
685+
jRes["runtime"] = runtime.str(); // running time, in minutes.
686686
// total ETH hashrate in MH/s, number of ETH shares, number of ETH rejected shares.
687687
jRes["ethhashrate"] = (p.rate());
688688
jRes["ethhashrates"] = detailedMhEth;

‎libapicore/httpServer.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@ httpServer http_server;
1818

1919
void httpServer::tableHeader(stringstream& ss, unsigned columns)
2020
{
21-
auto info = ethminer_get_buildinfo();
21+
auto version = std::string("ethminer-") + ethminer_get_buildinfo()->project_version;
2222
char hostName[HOST_NAME_MAX + 1];
2323
gethostname(hostName, HOST_NAME_MAX + 1);
2424
string l = m_farm->farmLaunchedFormatted();
2525
ss <<
2626
"<html><head><title>" << hostName <<
2727
"</title><style>tr:nth-child(even){background-color:Gainsboro;}</style>"
2828
"<meta http-equiv=refresh content=30></head><body><table width=\"50%\" border=1 cellpadding=2 cellspacing=0 align=center>"
29-
"<tr valign=top align=center style=background-color:Gold><th colspan=" << columns << ">" << info->project_version <<
29+
"<tr valign=top align=center style=background-color:Gold><th colspan=" << columns << ">" << version <<
3030
" on " << hostName << " - " << l << "</th></tr>";
3131
}
3232

‎libethcore/Miner.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ class Miner: public Worker
235235
void update_temperature(unsigned temperature)
236236
{
237237
/*
238-
cnote << "Setting temp" << temperature << " for gpu/" << index <<
238+
cnote << "Setting temp" << temperature << " for gpu" << index <<
239239
" tstop=" << farm.get_tstop() << " tstart=" << farm.get_tstart();
240240
*/
241241
bool _wait_for_tstart_temp = m_wait_for_tstart_temp.load(std::memory_order_relaxed);
@@ -244,14 +244,14 @@ class Miner: public Worker
244244
unsigned tstop = farm.get_tstop();
245245
if (tstop && temperature >= tstop)
246246
{
247-
cwarn << "Pause mining on gpu/" << index << " : temperature " << temperature << " is above --tstop " << tstop;
247+
cwarn << "Pause mining on gpu" << index << " : temperature " << temperature << " is above --tstop " << tstop;
248248
m_wait_for_tstart_temp.store(true, std::memory_order_relaxed);
249249
}
250250
} else {
251251
unsigned tstart = farm.get_tstart();
252252
if (tstart && temperature <= tstart)
253253
{
254-
cnote << "(Re)starting mining on gpu/" << index << " : temperature " << temperature << " is now below --tstart " << tstart;
254+
cnote << "(Re)starting mining on gpu" << index << " : temperature " << temperature << " is now below --tstart " << tstart;
255255
m_wait_for_tstart_temp.store(false, std::memory_order_relaxed);
256256
}
257257
}

0 commit comments

Comments
 (0)
This repository has been archived.