Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add info to signature gathering failure logs #5175

Merged
merged 1 commit into from
Sep 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 25 additions & 15 deletions testnet/stacks-node/src/nakamoto_node/miner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -358,22 +358,32 @@ impl BlockMinerThread {
&mut attempts,
) {
Ok(x) => x,
Err(e) => {
match e {
NakamotoNodeError::StacksTipChanged => {
info!("Stacks tip changed while waiting for signatures");
return Err(e);
}
NakamotoNodeError::BurnchainTipChanged => {
info!("Burnchain tip changed while waiting for signatures");
return Err(e);
}
_ => {
error!("Error while gathering signatures: {e:?}. Will try mining again.");
continue;
}
Err(e) => match e {
NakamotoNodeError::StacksTipChanged => {
info!("Stacks tip changed while waiting for signatures";
"signer_sighash" => %new_block.header.signer_signature_hash(),
"block_height" => new_block.header.chain_length,
"consensus_hash" => %new_block.header.consensus_hash,
);
return Err(e);
}
}
NakamotoNodeError::BurnchainTipChanged => {
info!("Burnchain tip changed while waiting for signatures";
"signer_sighash" => %new_block.header.signer_signature_hash(),
"block_height" => new_block.header.chain_length,
"consensus_hash" => %new_block.header.consensus_hash,
);
return Err(e);
}
_ => {
error!("Error while gathering signatures: {e:?}. Will try mining again.";
"signer_sighash" => %new_block.header.signer_signature_hash(),
"block_height" => new_block.header.chain_length,
"consensus_hash" => %new_block.header.consensus_hash,
);
continue;
}
},
};

new_block.header.signer_signature = signer_signature;
Expand Down