Add blockfound response in stratum (#1245)
* Add blockfound response in stratum
This commit is contained in:
committed by
GitHub
parent
708afdbbb6
commit
83be242fdf
@@ -576,7 +576,13 @@ impl StratumServer {
|
||||
submitted_by,
|
||||
);
|
||||
worker_stats.num_accepted += 1;
|
||||
return Ok((serde_json::to_value("ok".to_string()).unwrap(), share_is_block));
|
||||
let submit_response;
|
||||
if share_is_block {
|
||||
submit_response = format!("blockfound - {}", b.hash().to_hex());
|
||||
} else {
|
||||
submit_response = "ok".to_string();
|
||||
}
|
||||
return Ok((serde_json::to_value(submit_response).unwrap(), share_is_block));
|
||||
} // handle submit a solution
|
||||
|
||||
// Purge dead/sick workers - remove all workers marked in error state
|
||||
|
||||
Reference in New Issue
Block a user