mirror of
https://github.com/JayDDee/cpuminer-opt.git
synced 2025-09-17 23:44:27 +00:00
v3.12.4.1
This commit is contained in:
@@ -65,6 +65,13 @@ If not what makes it happen or not happen?
|
|||||||
Change Log
|
Change Log
|
||||||
----------
|
----------
|
||||||
|
|
||||||
|
v3.12.4.1
|
||||||
|
|
||||||
|
Issue #245: fix scantime when mining solo with getwork.
|
||||||
|
|
||||||
|
Added debug logs for creation of stratum and longpoll threads, use -D to
|
||||||
|
enable.
|
||||||
|
|
||||||
v3.12.4
|
v3.12.4
|
||||||
|
|
||||||
Issue #244: Change longpoll to ignore job id.
|
Issue #244: Change longpoll to ignore job id.
|
||||||
|
|||||||
20
configure
vendored
20
configure
vendored
@@ -1,6 +1,6 @@
|
|||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
# Guess values for system-dependent variables and create Makefiles.
|
# Guess values for system-dependent variables and create Makefiles.
|
||||||
# Generated by GNU Autoconf 2.69 for cpuminer-opt 3.12.4.
|
# Generated by GNU Autoconf 2.69 for cpuminer-opt 3.12.4.1.
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
|
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
|
||||||
@@ -577,8 +577,8 @@ MAKEFLAGS=
|
|||||||
# Identity of this package.
|
# Identity of this package.
|
||||||
PACKAGE_NAME='cpuminer-opt'
|
PACKAGE_NAME='cpuminer-opt'
|
||||||
PACKAGE_TARNAME='cpuminer-opt'
|
PACKAGE_TARNAME='cpuminer-opt'
|
||||||
PACKAGE_VERSION='3.12.4'
|
PACKAGE_VERSION='3.12.4.1'
|
||||||
PACKAGE_STRING='cpuminer-opt 3.12.4'
|
PACKAGE_STRING='cpuminer-opt 3.12.4.1'
|
||||||
PACKAGE_BUGREPORT=''
|
PACKAGE_BUGREPORT=''
|
||||||
PACKAGE_URL=''
|
PACKAGE_URL=''
|
||||||
|
|
||||||
@@ -1332,7 +1332,7 @@ if test "$ac_init_help" = "long"; then
|
|||||||
# Omit some internal or obsolete options to make the list less imposing.
|
# Omit some internal or obsolete options to make the list less imposing.
|
||||||
# This message is too long to be a string in the A/UX 3.1 sh.
|
# This message is too long to be a string in the A/UX 3.1 sh.
|
||||||
cat <<_ACEOF
|
cat <<_ACEOF
|
||||||
\`configure' configures cpuminer-opt 3.12.4 to adapt to many kinds of systems.
|
\`configure' configures cpuminer-opt 3.12.4.1 to adapt to many kinds of systems.
|
||||||
|
|
||||||
Usage: $0 [OPTION]... [VAR=VALUE]...
|
Usage: $0 [OPTION]... [VAR=VALUE]...
|
||||||
|
|
||||||
@@ -1404,7 +1404,7 @@ fi
|
|||||||
|
|
||||||
if test -n "$ac_init_help"; then
|
if test -n "$ac_init_help"; then
|
||||||
case $ac_init_help in
|
case $ac_init_help in
|
||||||
short | recursive ) echo "Configuration of cpuminer-opt 3.12.4:";;
|
short | recursive ) echo "Configuration of cpuminer-opt 3.12.4.1:";;
|
||||||
esac
|
esac
|
||||||
cat <<\_ACEOF
|
cat <<\_ACEOF
|
||||||
|
|
||||||
@@ -1509,7 +1509,7 @@ fi
|
|||||||
test -n "$ac_init_help" && exit $ac_status
|
test -n "$ac_init_help" && exit $ac_status
|
||||||
if $ac_init_version; then
|
if $ac_init_version; then
|
||||||
cat <<\_ACEOF
|
cat <<\_ACEOF
|
||||||
cpuminer-opt configure 3.12.4
|
cpuminer-opt configure 3.12.4.1
|
||||||
generated by GNU Autoconf 2.69
|
generated by GNU Autoconf 2.69
|
||||||
|
|
||||||
Copyright (C) 2012 Free Software Foundation, Inc.
|
Copyright (C) 2012 Free Software Foundation, Inc.
|
||||||
@@ -2012,7 +2012,7 @@ cat >config.log <<_ACEOF
|
|||||||
This file contains any messages produced by compilers while
|
This file contains any messages produced by compilers while
|
||||||
running configure, to aid debugging if configure makes a mistake.
|
running configure, to aid debugging if configure makes a mistake.
|
||||||
|
|
||||||
It was created by cpuminer-opt $as_me 3.12.4, which was
|
It was created by cpuminer-opt $as_me 3.12.4.1, which was
|
||||||
generated by GNU Autoconf 2.69. Invocation command line was
|
generated by GNU Autoconf 2.69. Invocation command line was
|
||||||
|
|
||||||
$ $0 $@
|
$ $0 $@
|
||||||
@@ -2993,7 +2993,7 @@ fi
|
|||||||
|
|
||||||
# Define the identity of the package.
|
# Define the identity of the package.
|
||||||
PACKAGE='cpuminer-opt'
|
PACKAGE='cpuminer-opt'
|
||||||
VERSION='3.12.4'
|
VERSION='3.12.4.1'
|
||||||
|
|
||||||
|
|
||||||
cat >>confdefs.h <<_ACEOF
|
cat >>confdefs.h <<_ACEOF
|
||||||
@@ -6690,7 +6690,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
|
|||||||
# report actual input values of CONFIG_FILES etc. instead of their
|
# report actual input values of CONFIG_FILES etc. instead of their
|
||||||
# values after options handling.
|
# values after options handling.
|
||||||
ac_log="
|
ac_log="
|
||||||
This file was extended by cpuminer-opt $as_me 3.12.4, which was
|
This file was extended by cpuminer-opt $as_me 3.12.4.1, which was
|
||||||
generated by GNU Autoconf 2.69. Invocation command line was
|
generated by GNU Autoconf 2.69. Invocation command line was
|
||||||
|
|
||||||
CONFIG_FILES = $CONFIG_FILES
|
CONFIG_FILES = $CONFIG_FILES
|
||||||
@@ -6756,7 +6756,7 @@ _ACEOF
|
|||||||
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
||||||
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
|
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
|
||||||
ac_cs_version="\\
|
ac_cs_version="\\
|
||||||
cpuminer-opt config.status 3.12.4
|
cpuminer-opt config.status 3.12.4.1
|
||||||
configured by $0, generated by GNU Autoconf 2.69,
|
configured by $0, generated by GNU Autoconf 2.69,
|
||||||
with options \\"\$ac_cs_config\\"
|
with options \\"\$ac_cs_config\\"
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
AC_INIT([cpuminer-opt], [3.12.4])
|
AC_INIT([cpuminer-opt], [3.12.4.1])
|
||||||
|
|
||||||
AC_PREREQ([2.59c])
|
AC_PREREQ([2.59c])
|
||||||
AC_CANONICAL_SYSTEM
|
AC_CANONICAL_SYSTEM
|
||||||
|
|||||||
38
cpu-miner.c
38
cpu-miner.c
@@ -2074,12 +2074,28 @@ static void *miner_thread( void *userdata )
|
|||||||
sleep(5);
|
sleep(5);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
// adjust max_nonce to meet target scan time
|
|
||||||
|
// LP_SCANTIME overrides opt_scantime option, is this right?
|
||||||
|
|
||||||
|
// adjust max_nonce to meet target scan time. Startum and longpoll
|
||||||
|
// can go longer because they can rely on restart_threads to signal
|
||||||
|
// an early abort. get_work on the other hand can't rely on
|
||||||
|
// restart_threads so need a much shorter scantime
|
||||||
|
if ( have_stratum )
|
||||||
|
max64 = 60 * thr_hashrates[thr_id];
|
||||||
|
else if ( have_longpoll )
|
||||||
|
max64 = LP_SCANTIME * thr_hashrates[thr_id];
|
||||||
|
else // getwork inline
|
||||||
|
max64 = opt_scantime * thr_hashrates[thr_id];
|
||||||
|
|
||||||
|
/*
|
||||||
if ( have_stratum )
|
if ( have_stratum )
|
||||||
max64 = LP_SCANTIME;
|
max64 = LP_SCANTIME;
|
||||||
else
|
else
|
||||||
max64 = g_work_time + ( have_longpoll ? LP_SCANTIME : opt_scantime )
|
max64 = g_work_time + ( have_longpoll ? LP_SCANTIME : opt_scantime )
|
||||||
- time(NULL);
|
- time(NULL);
|
||||||
|
*/
|
||||||
|
|
||||||
// time limit
|
// time limit
|
||||||
if ( unlikely( opt_time_limit && firstwork_time ) )
|
if ( unlikely( opt_time_limit && firstwork_time ) )
|
||||||
{
|
{
|
||||||
@@ -2106,17 +2122,20 @@ static void *miner_thread( void *userdata )
|
|||||||
}
|
}
|
||||||
if ( remain < max64 ) max64 = remain;
|
if ( remain < max64 ) max64 = remain;
|
||||||
}
|
}
|
||||||
// Select nonce range for approx 1 min duration based
|
|
||||||
// on hashrate, initial value arbitrarilly set to 1000 just to get
|
// Select nonce range based on max64, the estimated number of hashes
|
||||||
|
// to meet the desired scan time.
|
||||||
|
// Initial value arbitrarilly set to 1000 just to get
|
||||||
// a sample hashrate for the next time.
|
// a sample hashrate for the next time.
|
||||||
uint32_t work_nonce = *nonceptr;
|
uint32_t work_nonce = *nonceptr;
|
||||||
max64 = 60 * thr_hashrates[thr_id];
|
// max64 = 60 * thr_hashrates[thr_id];
|
||||||
if ( max64 <= 0)
|
if ( max64 <= 0)
|
||||||
max64 = 1000;
|
max64 = 1000;
|
||||||
if ( work_nonce + max64 > end_nonce )
|
if ( work_nonce + max64 > end_nonce )
|
||||||
max_nonce = end_nonce;
|
max_nonce = end_nonce;
|
||||||
else
|
else
|
||||||
max_nonce = work_nonce + (uint32_t)max64;
|
max_nonce = work_nonce + (uint32_t)max64;
|
||||||
|
|
||||||
// init time
|
// init time
|
||||||
if ( firstwork_time == 0 )
|
if ( firstwork_time == 0 )
|
||||||
firstwork_time = time(NULL);
|
firstwork_time = time(NULL);
|
||||||
@@ -3677,6 +3696,9 @@ int main(int argc, char *argv[])
|
|||||||
/* ESET-NOD32 Detects these 2 thread_create... */
|
/* ESET-NOD32 Detects these 2 thread_create... */
|
||||||
if (want_longpoll && !have_stratum)
|
if (want_longpoll && !have_stratum)
|
||||||
{
|
{
|
||||||
|
if ( opt_debug )
|
||||||
|
applog(LOG_INFO,"Creating long poll thread");
|
||||||
|
|
||||||
/* init longpoll thread info */
|
/* init longpoll thread info */
|
||||||
longpoll_thr_id = opt_n_threads + 1;
|
longpoll_thr_id = opt_n_threads + 1;
|
||||||
thr = &thr_info[longpoll_thr_id];
|
thr = &thr_info[longpoll_thr_id];
|
||||||
@@ -3693,6 +3715,9 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
if (want_stratum)
|
if (want_stratum)
|
||||||
{
|
{
|
||||||
|
if ( opt_debug )
|
||||||
|
applog(LOG_INFO,"Creating stratum thread");
|
||||||
|
|
||||||
/* init stratum thread info */
|
/* init stratum thread info */
|
||||||
stratum_thr_id = opt_n_threads + 2;
|
stratum_thr_id = opt_n_threads + 2;
|
||||||
thr = &thr_info[stratum_thr_id];
|
thr = &thr_info[stratum_thr_id];
|
||||||
@@ -3713,6 +3738,9 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
if ( opt_api_enabled )
|
if ( opt_api_enabled )
|
||||||
{
|
{
|
||||||
|
if ( opt_debug )
|
||||||
|
applog(LOG_INFO,"Creating API thread");
|
||||||
|
|
||||||
/* api thread */
|
/* api thread */
|
||||||
api_thr_id = opt_n_threads + 3;
|
api_thr_id = opt_n_threads + 3;
|
||||||
thr = &thr_info[api_thr_id];
|
thr = &thr_info[api_thr_id];
|
||||||
@@ -3723,7 +3751,7 @@ int main(int argc, char *argv[])
|
|||||||
err = thread_create( thr, api_thread );
|
err = thread_create( thr, api_thread );
|
||||||
if ( err )
|
if ( err )
|
||||||
{
|
{
|
||||||
applog( LOG_ERR, "api thread create failed" );
|
applog( LOG_ERR, "API thread create failed" );
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
if ( !opt_quiet )
|
if ( !opt_quiet )
|
||||||
|
|||||||
Reference in New Issue
Block a user