mirror of
https://github.com/GOSTSec/sgminer
synced 2025-09-14 15:11:56 +00:00
Add option --more-notices & shorten stale submit
This commit is contained in:
parent
ff05aacdc3
commit
0f9bf18172
21
sgminer.c
21
sgminer.c
@ -1352,6 +1352,9 @@ static struct opt_table opt_config_table[] = {
|
|||||||
opt_set_bool, &opt_incognito,
|
opt_set_bool, &opt_incognito,
|
||||||
"Do not display user name in status window"),
|
"Do not display user name in status window"),
|
||||||
#endif
|
#endif
|
||||||
|
OPT_WITHOUT_ARG("--more-notices",
|
||||||
|
opt_set_bool, &opt_morenotices,
|
||||||
|
"Shows work restart and new block notices, hidden by default"),
|
||||||
OPT_WITH_ARG("--intensity|-I",
|
OPT_WITH_ARG("--intensity|-I",
|
||||||
set_intensity, NULL, NULL,
|
set_intensity, NULL, NULL,
|
||||||
"Intensity of GPU scanning (d or " MIN_INTENSITY_STR
|
"Intensity of GPU scanning (d or " MIN_INTENSITY_STR
|
||||||
@ -4192,6 +4195,8 @@ static bool test_work_current(struct work *work)
|
|||||||
}
|
}
|
||||||
|
|
||||||
work->work_block = ++work_block;
|
work->work_block = ++work_block;
|
||||||
|
if (opt_morenotices)
|
||||||
|
{
|
||||||
if (work->longpoll) {
|
if (work->longpoll) {
|
||||||
if (work->stratum) {
|
if (work->stratum) {
|
||||||
applog(LOG_NOTICE, "Stratum from %s detected new block", get_pool_name(pool));
|
applog(LOG_NOTICE, "Stratum from %s detected new block", get_pool_name(pool));
|
||||||
@ -4203,6 +4208,7 @@ static bool test_work_current(struct work *work)
|
|||||||
applog(LOG_NOTICE, "New block detected on network before pool notification");
|
applog(LOG_NOTICE, "New block detected on network before pool notification");
|
||||||
else
|
else
|
||||||
applog(LOG_NOTICE, "New block detected on network");
|
applog(LOG_NOTICE, "New block detected on network");
|
||||||
|
}
|
||||||
restart_threads();
|
restart_threads();
|
||||||
} else {
|
} else {
|
||||||
if (memcmp(pool->prev_block, bedata, 32)) {
|
if (memcmp(pool->prev_block, bedata, 32)) {
|
||||||
@ -4231,11 +4237,12 @@ static bool test_work_current(struct work *work)
|
|||||||
if (work->longpoll) {
|
if (work->longpoll) {
|
||||||
work->work_block = ++work_block;
|
work->work_block = ++work_block;
|
||||||
if (shared_strategy() || work->pool == current_pool()) {
|
if (shared_strategy() || work->pool == current_pool()) {
|
||||||
if (work->stratum) {
|
if(opt_morenotices)
|
||||||
applog(LOG_NOTICE, "Stratum from %s requested work restart", get_pool_name(pool));
|
if (work->stratum) {
|
||||||
} else {
|
applog(LOG_NOTICE, "Stratum from %s requested work restart", get_pool_name(pool));
|
||||||
applog(LOG_NOTICE, "%sLONGPOLL from %s requested work restart", work->gbt ? "GBT " : "", get_pool_name(pool));
|
} else {
|
||||||
}
|
applog(LOG_NOTICE, "%sLONGPOLL from %s requested work restart", work->gbt ? "GBT " : "", get_pool_name(pool));
|
||||||
|
}
|
||||||
restart_threads();
|
restart_threads();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -6312,9 +6319,9 @@ static void submit_work_async(struct work *work)
|
|||||||
|
|
||||||
if (stale_work(work, true)) {
|
if (stale_work(work, true)) {
|
||||||
if (opt_submit_stale)
|
if (opt_submit_stale)
|
||||||
applog(LOG_NOTICE, "%s stale share detected, submitting as user requested", get_pool_name(pool));
|
applog(LOG_NOTICE, "%s stale share detected, submitting (user)", get_pool_name(pool));
|
||||||
else if (pool->submit_old)
|
else if (pool->submit_old)
|
||||||
applog(LOG_NOTICE, "%s stale share detected, submitting as pool requested", get_pool_name(pool));
|
applog(LOG_NOTICE, "%s stale share detected, submitting (pool)", get_pool_name(pool));
|
||||||
else {
|
else {
|
||||||
applog(LOG_NOTICE, "%s stale share detected, discarding", get_pool_name(pool));
|
applog(LOG_NOTICE, "%s stale share detected, discarding", get_pool_name(pool));
|
||||||
sharelog("discard", work);
|
sharelog("discard", work);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user