@@ -361,11 +361,11 @@ void EthStratumClient::processReponse(Json::Value& responseObject)
361
361
break ;
362
362
case 4 :
363
363
if (responseObject.get (" result" , false ).asBool ()) {
364
- cnote << EthLime << " B-) Submitted and accepted ." << EthReset;
364
+ cnote << EthLime << " Accepted ." << EthReset;
365
365
p_farm->acceptedSolution (m_stale);
366
366
}
367
367
else {
368
- cwarn << " :-( Not accepted ." ;
368
+ cwarn << " Rejected ." ;
369
369
p_farm->rejectedSolution (m_stale);
370
370
}
371
371
break ;
@@ -399,7 +399,6 @@ void EthStratumClient::processReponse(Json::Value& responseObject)
399
399
400
400
if (sHeaderHash != " " && sSeedHash != " " )
401
401
{
402
- cnote << " Received new job #" + job;
403
402
404
403
h256 seedHash = h256 (sSeedHash );
405
404
@@ -419,6 +418,9 @@ void EthStratumClient::processReponse(Json::Value& responseObject)
419
418
m_job = job;
420
419
421
420
p_farm->setWork (m_current);
421
+ cnote << " Received new job #" + job.substr (0 , 8 )
422
+ << " seed: " << " #" + m_current.seed .hex ().substr (0 , 32 )
423
+ << " target: " << " #" + m_current.boundary .hex ().substr (0 , 24 );
422
424
}
423
425
}
424
426
else
@@ -435,7 +437,6 @@ void EthStratumClient::processReponse(Json::Value& responseObject)
435
437
436
438
if (sHeaderHash != " " && sSeedHash != " " && sShareTarget != " " )
437
439
{
438
- cnote << " Received new job #" + job.substr (0 , 8 );
439
440
440
441
h256 seedHash = h256 (sSeedHash );
441
442
h256 headerHash = h256 (sHeaderHash );
@@ -457,6 +458,10 @@ void EthStratumClient::processReponse(Json::Value& responseObject)
457
458
m_job = job;
458
459
459
460
p_farm->setWork (m_current);
461
+ cnote << " Received new job #" + job.substr (0 , 8 )
462
+ << " seed: " << " #" + m_current.seed .hex ().substr (0 , 32 )
463
+ << " target: " << " #" + m_current.boundary .hex ().substr (0 , 24 );
464
+
460
465
// x_current.unlock();
461
466
p_worktimer = new boost::asio::deadline_timer (m_io_service, boost::posix_time::seconds (m_worktimeout));
462
467
p_worktimer->async_wait (boost::bind (&EthStratumClient::work_timeout_handler, this , boost::asio::placeholders::error));
@@ -521,15 +526,11 @@ bool EthStratumClient::submit(Solution solution) {
521
526
string temp_previous_job = m_previousJob;
522
527
x_current.unlock ();
523
528
524
- cnote << " Solution found; Submitting to" << p_active->host << " ..." ;
525
-
526
529
string minernonce;
527
530
string nonceHex = toHex (solution.nonce );
528
- if (m_protocol != STRATUM_PROTOCOL_ETHEREUMSTRATUM)
529
- cnote << " Nonce:" << " 0x" + nonceHex;
530
- else
531
+ if (m_protocol == STRATUM_PROTOCOL_ETHEREUMSTRATUM) {
531
532
minernonce = nonceHex.substr (m_extraNonceHexSize, 16 - m_extraNonceHexSize);
532
-
533
+ }
533
534
534
535
if (EthashAux::eval (tempWork.seed , tempWork.header , solution.nonce ).value < tempWork.boundary )
535
536
{
@@ -553,6 +554,10 @@ bool EthStratumClient::submit(Solution solution) {
553
554
async_write (m_socket, m_requestBuffer,
554
555
boost::bind (&EthStratumClient::handleResponse, this ,
555
556
boost::asio::placeholders::error));
557
+ cnote << " Solution found; Submitted to" << p_active->host ;
558
+ if (m_protocol != STRATUM_PROTOCOL_ETHEREUMSTRATUM) {
559
+ cnote << " Nonce:" << " 0x" + nonceHex;
560
+ }
556
561
return true ;
557
562
}
558
563
else if (EthashAux::eval (tempPreviousWork.seed , tempPreviousWork.header , solution.nonce ).value < tempPreviousWork.boundary )
@@ -574,10 +579,10 @@ bool EthStratumClient::submit(Solution solution) {
574
579
std::ostream os (&m_requestBuffer);
575
580
os << json;
576
581
m_stale = true ;
577
- cwarn << " Submitting stale solution." ;
578
582
async_write (m_socket, m_requestBuffer,
579
583
boost::bind (&EthStratumClient::handleResponse, this ,
580
584
boost::asio::placeholders::error));
585
+ cwarn << " Submitted stale solution." ;
581
586
return true ;
582
587
}
583
588
else {
0 commit comments