Skip to content

Commit

Permalink
readability for the win
Browse files Browse the repository at this point in the history
  • Loading branch information
djordon committed Nov 18, 2024
1 parent b30f952 commit bb02a92
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
15 changes: 12 additions & 3 deletions signer/src/transaction_coordinator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,10 @@ where
Ok(is_epoch3)
}

#[tracing::instrument(skip_all, fields(public_key = %self.signer_public_key(), chain_tip = tracing::field::Empty))]
#[tracing::instrument(
skip_all,
fields(public_key = %self.signer_public_key(), chain_tip = tracing::field::Empty)
)]
async fn process_new_blocks(&mut self) -> Result<(), Error> {
if !self.is_epoch3().await? {
return Ok(());
Expand Down Expand Up @@ -383,7 +386,10 @@ where
.await?
.ok_or(Error::NoStacksChainTip)?;

tracing::debug!(stacks_chain_tip = %stacks_chain_tip.block_hash, "retrieved the stacks chain tip");
tracing::debug!(
stacks_chain_tip = %stacks_chain_tip.block_hash,
"retrieved the stacks chain tip"
);

let pending_requests_fut =
self.get_pending_requests(bitcoin_chain_tip, aggregate_key, signer_public_keys);
Expand Down Expand Up @@ -684,7 +690,10 @@ where
// to do that at the source when we receive the message.

if &msg.bitcoin_chain_tip != chain_tip {
tracing::warn!(origin = %msg.signer_pub_key, "concurrent signing round message observed");
tracing::warn!(
sender = %msg.signer_pub_key,
"concurrent signing round message observed"
);
continue;
}

Expand Down
6 changes: 5 additions & 1 deletion signer/src/transaction_signer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,11 @@ where
Rng: rand::RngCore + rand::CryptoRng,
{
/// Run the signer event loop
#[tracing::instrument(skip_all, fields(public_key = %self.signer_public_key()), name = "tx-signer")]
#[tracing::instrument(
skip_all,
fields(public_key = %self.signer_public_key()),
name = "tx-signer"
)]
pub async fn run(mut self) -> Result<(), Error> {
if let Err(error) = self.context.signal(TxSignerEvent::EventLoopStarted.into()) {
tracing::error!(%error, "error signalling event loop start");
Expand Down

0 comments on commit bb02a92

Please sign in to comment.