mirror of
https://github.com/mimblewimble/grin.git
synced 2025-01-21 03:21:08 +03:00
Add blockfound response in stratum (#1245)
* Add blockfound response in stratum
This commit is contained in:
parent
708afdbbb6
commit
83be242fdf
1 changed files with 7 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue