mirror of
https://github.com/mimblewimble/grin.git
synced 2025-01-21 03:21:08 +03:00
Add shares edge_bits to the stratum submit log messages (#1876)
This commit is contained in:
parent
17f15b6dae
commit
2587ef5eb0
1 changed files with 13 additions and 9 deletions
|
@ -444,8 +444,8 @@ impl StratumServer {
|
||||||
if params.height != self.current_block_versions.last().unwrap().header.height {
|
if params.height != self.current_block_versions.last().unwrap().header.height {
|
||||||
// Return error status
|
// Return error status
|
||||||
error!(
|
error!(
|
||||||
"(Server ID: {}) Share at height {} submitted too late",
|
"(Server ID: {}) Share at height {} with {} edge_bits submitted too late",
|
||||||
self.id, params.height,
|
self.id, params.height, params.edge_bits,
|
||||||
);
|
);
|
||||||
worker_stats.num_stale += 1;
|
worker_stats.num_stale += 1;
|
||||||
let e = RpcError {
|
let e = RpcError {
|
||||||
|
@ -459,8 +459,8 @@ impl StratumServer {
|
||||||
if b.is_none() {
|
if b.is_none() {
|
||||||
// Return error status
|
// Return error status
|
||||||
error!(
|
error!(
|
||||||
"(Server ID: {}) Failed to validate solution at height {}: invalid job_id {}",
|
"(Server ID: {}) Failed to validate solution at height {} with {} edge_bits: invalid job_id {}",
|
||||||
self.id, params.height, params.job_id,
|
self.id, params.height, params.edge_bits, params.job_id,
|
||||||
);
|
);
|
||||||
worker_stats.num_rejected += 1;
|
worker_stats.num_rejected += 1;
|
||||||
let e = RpcError {
|
let e = RpcError {
|
||||||
|
@ -480,8 +480,8 @@ impl StratumServer {
|
||||||
if share_difficulty < self.minimum_share_difficulty {
|
if share_difficulty < self.minimum_share_difficulty {
|
||||||
// Return error status
|
// Return error status
|
||||||
error!(
|
error!(
|
||||||
"(Server ID: {}) Share rejected due to low difficulty: {}/{}",
|
"(Server ID: {}) Share at height {} with {} edge_bits rejected due to low difficulty: {}/{}",
|
||||||
self.id, share_difficulty, self.minimum_share_difficulty,
|
self.id, params.height, params.edge_bits, share_difficulty, self.minimum_share_difficulty,
|
||||||
);
|
);
|
||||||
worker_stats.num_rejected += 1;
|
worker_stats.num_rejected += 1;
|
||||||
let e = RpcError {
|
let e = RpcError {
|
||||||
|
@ -497,9 +497,10 @@ impl StratumServer {
|
||||||
if let Err(e) = res {
|
if let Err(e) = res {
|
||||||
// Return error status
|
// Return error status
|
||||||
error!(
|
error!(
|
||||||
"(Server ID: {}) Failed to validate solution at height {}: {}: {}",
|
"(Server ID: {}) Failed to validate solution at height {} with {} edge_bits: {}: {}",
|
||||||
self.id,
|
self.id,
|
||||||
params.height,
|
params.height,
|
||||||
|
params.edge_bits,
|
||||||
e,
|
e,
|
||||||
e.backtrace().unwrap(),
|
e.backtrace().unwrap(),
|
||||||
);
|
);
|
||||||
|
@ -521,9 +522,10 @@ impl StratumServer {
|
||||||
if !pow::verify_size(&b.header, b.header.pow.proof.edge_bits).is_ok() {
|
if !pow::verify_size(&b.header, b.header.pow.proof.edge_bits).is_ok() {
|
||||||
// Return error status
|
// Return error status
|
||||||
error!(
|
error!(
|
||||||
"(Server ID: {}) Failed to validate share at height {} with nonce {} using job_id {}",
|
"(Server ID: {}) Failed to validate share at height {} with {} edge_bits with nonce {} using job_id {}",
|
||||||
self.id,
|
self.id,
|
||||||
params.height,
|
params.height,
|
||||||
|
params.edge_bits,
|
||||||
b.header.pow.nonce,
|
b.header.pow.nonce,
|
||||||
params.job_id,
|
params.job_id,
|
||||||
);
|
);
|
||||||
|
@ -541,10 +543,11 @@ impl StratumServer {
|
||||||
Some(login) => login.clone(),
|
Some(login) => login.clone(),
|
||||||
};
|
};
|
||||||
info!(
|
info!(
|
||||||
"(Server ID: {}) Got share for block: hash {}, height {}, nonce {}, difficulty {}/{}, submitted by {}",
|
"(Server ID: {}) Got share for block: hash {}, height {}, edge_bits {}, nonce {}, difficulty {}/{}, submitted by {}",
|
||||||
self.id,
|
self.id,
|
||||||
b.hash(),
|
b.hash(),
|
||||||
b.header.height,
|
b.header.height,
|
||||||
|
b.header.pow.proof.edge_bits,
|
||||||
b.header.pow.nonce,
|
b.header.pow.nonce,
|
||||||
share_difficulty,
|
share_difficulty,
|
||||||
self.current_difficulty,
|
self.current_difficulty,
|
||||||
|
@ -763,3 +766,4 @@ where
|
||||||
serde_json::to_value(e).unwrap()
|
serde_json::to_value(e).unwrap()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue