much ado about nothing. simpler to have each miner thread define a local copy, all refs are
within scope so should be no problem.
It was the Bitcointalk forum that inspired us to create Bitcointalksearch.org - Bitcointalk is an excellent site that should be the default page for anybody dealing in cryptocurrency, since it is a virtual gold-mine of data. However, our experience and user feedback led us create our site; Bitcointalk's search is slow, and difficult to get the results you need, because you need to log in first to find anything useful - furthermore, there are rate limiters for their search functionality.
The aim of our project is to create a faster website that yields more results and faster without having to create an account and eliminate the need to log in - your personal data, therefore, will never be in jeopardy since we are not asking for any of your data and you don't need to provide them to use our site with all of its capabilities.
We created this website with the sole purpose of users being able to search quickly and efficiently in the field of cryptocurrency so they will have access to the latest and most accurate information and thereby assisting the crypto-community at large.
// declare some function pointers
// mandatory functions require a custom target function specific to each algo.
// Otherwise the null instance will return a fail code.
// Optional functions may not be required for certain algos or the null
// instance provides a safe default. If the default null instance is suitable for
// a particular algo it is not necessary to define a custom target function.
typedef struct
{
//mandatory
int *( *scanhash ) ( int, uint32_t*, const uint32_t*, uint32_t, uint64_t* );
void *( *hash )( void*, const void*, uint32_t ) ;
//optional
void *( *init_ctx ) ();
uint32_t *( *get_max64 ) ();
void *( *get_opt) ();
bool *( *full_test) ();
void *( *set_target) ( struct work*, uint32_t, uint32_t );
void *( *gen_merkle_root) ( char* merkle_root, struct stratum_ctx* );
bool *( *get_scratchbuf ) ( char* );
int *( *check_algo_alias) ( enum algos );
void *( *ignore_pok) ( int, int );
void *( *display_hashrate)( int, uint64_t );
void *( *display_benchmark_hashrate)( int, uint64_t* );
void *( *wait_for_diff) ( struct stratum_ctx* );
} algo_gate_t;
bool register_x11_algo( algo_gate_t* gate )
{
gate->init_ctx = &init_x11_aes_ctx;
gate->scanhash = &scanhash_x11_aes;
gate->hash = &x11_hash_aes;
return true;
};
if ( false == register_algo_gate( opt_algo, algo_gate[thr_id] ) )
{
applog(LOG_ERR,"Thread %d algo_gate registration failed.\n", thr_id);
if ( NULL != algo_gate )
{
free( algo_gate );
}
exit(1);
}
if ( algo_gate->scanhash != null_scanhash )
{
rc = algo_gate->scanhash( thr_id, work.data, work.target, max_nonce,
&hashes_done );
}
else
{
applog(LOG_ERR,"%s has no scanhash function registered.\n",
algo_names[opt_algo]);
}
[2016-01-31 00:05:26] accepted: 15/15 (100.00%), 2316 kH/s yes!
[2016-01-31 00:05:34] CPU #47: 49.16 kH/s
^C[2016-01-31 00:05:42] SIGINT received, exiting
thewolf@thewolf-H8QG6:~/Downloads/cpuminer-opt-3.0.7$ ./cpuminer -a x11 -o stratum+tcp://x11.usa.nicehash.com:3336 -u 18tvS3deKZK5q4eTtPRWYeEMWmGmuErHgz.H8QG6 -p d=0.01 -t 48
[2016-01-31 00:05:26] accepted: 15/15 (100.00%), 2316 kH/s yes!
[2016-01-31 00:05:34] CPU #47: 49.16 kH/s
^C[2016-01-31 00:05:42] SIGINT received, exiting
thewolf@thewolf-H8QG6:~/Downloads/cpuminer-opt-3.0.7$ ./cpuminer -a x11 -o stratum+tcp://x11.usa.nicehash.com:3336 -u 18tvS3deKZK5q4eTtPRWYeEMWmGmuErHgz.H8QG6 -p d=0.01 -t 48
[2016-01-31 00:05:26] accepted: 15/15 (100.00%), 2316 kH/s yes!
[2016-01-31 00:05:34] CPU #47: 49.16 kH/s
^C[2016-01-31 00:05:42] SIGINT received, exiting
thewolf@thewolf-H8QG6:~/Downloads/cpuminer-opt-3.0.7$ ./cpuminer -a x11 -o stratum+tcp://x11.usa.nicehash.com:3336 -u 18tvS3deKZK5q4eTtPRWYeEMWmGmuErHgz.H8QG6 -p d=0.01 -t 48
[2016-01-31 00:05:26] accepted: 15/15 (100.00%), 2316 kH/s yes!
[2016-01-31 00:05:34] CPU #47: 49.16 kH/s
^C[2016-01-31 00:05:42] SIGINT received, exiting
thewolf@thewolf-H8QG6:~/Downloads/cpuminer-opt-3.0.7$ ./cpuminer -a x11 -o stratum+tcp://x11.usa.nicehash.com:3336 -u 18tvS3deKZK5q4eTtPRWYeEMWmGmuErHgz.H8QG6 -p d=0.01 -t 48
[2016-01-31 00:05:26] accepted: 15/15 (100.00%), 2316 kH/s yes!
[2016-01-31 00:05:34] CPU #47: 49.16 kH/s
^C[2016-01-31 00:05:42] SIGINT received, exiting
thewolf@thewolf-H8QG6:~/Downloads/cpuminer-opt-3.0.7$ ./cpuminer -a x11 -o stratum+tcp://x11.usa.nicehash.com:3336 -u 18tvS3deKZK5q4eTtPRWYeEMWmGmuErHgz.H8QG6 -p d=0.01 -t 48
[2016-01-31 00:05:26] accepted: 15/15 (100.00%), 2316 kH/s yes!
[2016-01-31 00:05:34] CPU #47: 49.16 kH/s
^C[2016-01-31 00:05:42] SIGINT received, exiting
thewolf@thewolf-H8QG6:~/Downloads/cpuminer-opt-3.0.7$ ./cpuminer -a x11 -o stratum+tcp://x11.usa.nicehash.com:3336 -u 18tvS3deKZK5q4eTtPRWYeEMWmGmuErHgz.H8QG6 -p d=0.01 -t 48
[2016-01-31 00:05:26] accepted: 15/15 (100.00%), 2316 kH/s yes!
[2016-01-31 00:05:34] CPU #47: 49.16 kH/s
^C[2016-01-31 00:05:42] SIGINT received, exiting
thewolf@thewolf-H8QG6:~/Downloads/cpuminer-opt-3.0.7$ ./cpuminer -a x11 -o stratum+tcp://x11.usa.nicehash.com:3336 -u 18tvS3deKZK5q4eTtPRWYeEMWmGmuErHgz.H8QG6 -p d=0.01 -t 48
[2016-01-31 00:05:26] accepted: 15/15 (100.00%), 2316 kH/s yes!
[2016-01-31 00:05:34] CPU #47: 49.16 kH/s
^C[2016-01-31 00:05:42] SIGINT received, exiting
thewolf@thewolf-H8QG6:~/Downloads/cpuminer-opt-3.0.7$ ./cpuminer -a x11 -o stratum+tcp://x11.usa.nicehash.com:3336 -u 18tvS3deKZK5q4eTtPRWYeEMWmGmuErHgz.H8QG6 -p d=0.01 -t 48