From bb02a92a63ab68af348161c9cc504c7788e0654e Mon Sep 17 00:00:00 2001 From: djordon Date: Mon, 18 Nov 2024 16:25:43 -0500 Subject: [PATCH] readability for the win --- signer/src/transaction_coordinator.rs | 15 ++++++++++++--- signer/src/transaction_signer.rs | 6 +++++- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/signer/src/transaction_coordinator.rs b/signer/src/transaction_coordinator.rs index 51b1240e1..260c156d5 100644 --- a/signer/src/transaction_coordinator.rs +++ b/signer/src/transaction_coordinator.rs @@ -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(()); @@ -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); @@ -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; } diff --git a/signer/src/transaction_signer.rs b/signer/src/transaction_signer.rs index 59d3113ef..6256be0c8 100644 --- a/signer/src/transaction_signer.rs +++ b/signer/src/transaction_signer.rs @@ -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");