Skip to content

Commit 1fa594a

Browse files
authored
Merge pull request #5175 from stacks-network/chore/miner-logs
chore: add info to signature gathering failure logs
2 parents ff57dc6 + c77c024 commit 1fa594a

File tree

1 file changed

+25
-15
lines changed
  • testnet/stacks-node/src/nakamoto_node

1 file changed

+25
-15
lines changed

testnet/stacks-node/src/nakamoto_node/miner.rs

Lines changed: 25 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -358,22 +358,32 @@ impl BlockMinerThread {
358358
&mut attempts,
359359
) {
360360
Ok(x) => x,
361-
Err(e) => {
362-
match e {
363-
NakamotoNodeError::StacksTipChanged => {
364-
info!("Stacks tip changed while waiting for signatures");
365-
return Err(e);
366-
}
367-
NakamotoNodeError::BurnchainTipChanged => {
368-
info!("Burnchain tip changed while waiting for signatures");
369-
return Err(e);
370-
}
371-
_ => {
372-
error!("Error while gathering signatures: {e:?}. Will try mining again.");
373-
continue;
374-
}
361+
Err(e) => match e {
362+
NakamotoNodeError::StacksTipChanged => {
363+
info!("Stacks tip changed while waiting for signatures";
364+
"signer_sighash" => %new_block.header.signer_signature_hash(),
365+
"block_height" => new_block.header.chain_length,
366+
"consensus_hash" => %new_block.header.consensus_hash,
367+
);
368+
return Err(e);
375369
}
376-
}
370+
NakamotoNodeError::BurnchainTipChanged => {
371+
info!("Burnchain tip changed while waiting for signatures";
372+
"signer_sighash" => %new_block.header.signer_signature_hash(),
373+
"block_height" => new_block.header.chain_length,
374+
"consensus_hash" => %new_block.header.consensus_hash,
375+
);
376+
return Err(e);
377+
}
378+
_ => {
379+
error!("Error while gathering signatures: {e:?}. Will try mining again.";
380+
"signer_sighash" => %new_block.header.signer_signature_hash(),
381+
"block_height" => new_block.header.chain_length,
382+
"consensus_hash" => %new_block.header.consensus_hash,
383+
);
384+
continue;
385+
}
386+
},
377387
};
378388

379389
new_block.header.signer_signature = signer_signature;

0 commit comments

Comments
 (0)