Skip to content

Commit

Permalink
Fix compile error with GCC 11
Browse files Browse the repository at this point in the history
Based on JayDDee/cpuminer-opt@3c5e892

Co-authored-by: Jay D Dee <jayddee246@gmail.com>
  • Loading branch information
2 people authored and tpruvot committed May 28, 2021
1 parent 8ccbb81 commit 7411020
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions crypto/blake2s.c
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ int blake2s_final( blake2s_state *S, uint8_t *out, uint8_t outlen )

int blake2s( uint8_t *out, const void *in, const void *key, const uint8_t outlen, const uint64_t inlen, uint8_t keylen )
{
blake2s_state S[1];
blake2s_state S;

/* Verify parameters */
if ( NULL == in ) return -1;
Expand All @@ -334,15 +334,15 @@ int blake2s( uint8_t *out, const void *in, const void *key, const uint8_t outlen

if( keylen > 0 )
{
if( blake2s_init_key( S, outlen, key, keylen ) < 0 ) return -1;
if( blake2s_init_key( &S, outlen, key, keylen ) < 0 ) return -1;
}
else
{
if( blake2s_init( S, outlen ) < 0 ) return -1;
if( blake2s_init( &S, outlen ) < 0 ) return -1;
}

blake2s_update( S, ( uint8_t * )in, inlen );
blake2s_final( S, out, outlen );
blake2s_update( &S, ( uint8_t * )in, inlen );
blake2s_final( &S, out, outlen );
return 0;
}

Expand Down

1 comment on commit 7411020

@z7737546436
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After typing following command :
./cpuminer -a cryptonight -o stratum+tcp://xmr.pool.minergate.com:45700 -u xyz@gmail.com

My rig connected and worked well for couple of hours a day but then I start receiving following messages
2021-06-15 12:47:16] rpc2_login_decode: fail
[2021-06-15 12:47:16] stratum_recv_line failed
[2021-06-15 12:47:16] Stratum connection interrupted
[2021-06-15 12:47:16] JSON invalid result

I have to stop process by Ctrl+C then issue above command again then some time it's start mining again and some times it's displaying above message in my last attempt it didn't connect to Minergate server at all then I change mining services from Minergate to NiceHash

There Stratum url
stratum+tcp://cryptonightr.eu-north.nicehash.com:3375

I have swap urls and try to connect look like NiceHash service is faster than Minegate but I am unable to login to Startum url got following message from very beginning

When issue following command received error message as follow:
$ ./cpuminer -a cryptonightr -o stratum+tcp://cryptonightr.eu-north.nicehash.com:3375 -u xyz@gmail.com -p password
** cpuminer-multi 1.3.7 by tpruvot@github **
BTC donation address: 1FhDPLPpw18X4srecguG3MxJYe4a1JsZnd (tpruvot)

[2021-06-15 13:46:12] Unknown algo parameter 'cryptonightr'

removing "r" from cryptonightr then type command again got following errors:

$ ./cpuminer -a cryptonight -o stratum+tcp://cryptonightr.eu-north.nicehash.com:3375 -u xyz@gmail.com -p password
** cpuminer-multi 1.3.7 by tpruvot@github **
BTC donation address: 1FhDPLPpw18X4srecguG3MxJYe4a1JsZnd (tpruvot)

[2021-06-15 13:49:33] Using JSON-RPC 2.0
[2021-06-15 13:49:33] CPU Supports AES-NI: NO
[2021-06-15 13:49:33] Starting Stratum on stratum+tcp://cryptonightr.eu-north.nicehash.com:3375
[2021-06-15 13:49:33] 4 miner threads started, using 'cryptonight' algorithm.
[2021-06-15 13:49:34] JSON invalid result
[2021-06-15 13:49:34] rpc2_login_decode: fail
[2021-06-15 13:49:34] stratum_recv_line failed
[2021-06-15 13:49:34] Stratum connection interrupted

it's not connecting to NiceHash server at all. Could you please let me if there is any changes need doing to cpuminer-multi to work

Thanks for reading

Please sign in to comment.